aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpuCommandBuffer.h
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-08-31 11:55:52 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-31 11:55:52 -0700
commit29df76096fd30941086324902a82656df2d8becd (patch)
tree37740539e50fcdc09d694bc39e98e55aa26cf3f4 /src/gpu/GrGpuCommandBuffer.h
parentdc43898bbbd06202562514ae785116e0cc40f825 (diff)
Define clear regions in terms of GrFixedClip
Updates clear APIs to take GrFixedClip instead of a rectangle. This will allow us to use window rectangles with clears. Removes stencil knobs from GrFixedClip. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262473003 Review-Url: https://codereview.chromium.org/2262473003
Diffstat (limited to 'src/gpu/GrGpuCommandBuffer.h')
-rw-r--r--src/gpu/GrGpuCommandBuffer.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gpu/GrGpuCommandBuffer.h b/src/gpu/GrGpuCommandBuffer.h
index 9abcc20fc7..2336dc5aaf 100644
--- a/src/gpu/GrGpuCommandBuffer.h
+++ b/src/gpu/GrGpuCommandBuffer.h
@@ -10,6 +10,7 @@
#include "GrColor.h"
+class GrFixedClip;
class GrGpu;
class GrMesh;
class GrPipeline;
@@ -65,9 +66,9 @@ public:
/**
* Clear the passed in render target. Ignores the draw state and clip.
*/
- void clear(const SkIRect& rect, GrColor color, GrRenderTarget* renderTarget);
+ void clear(const GrFixedClip&, GrColor, GrRenderTarget*);
- void clearStencilClip(const SkIRect& rect, bool insideClip, GrRenderTarget* renderTarget);
+ void clearStencilClip(const GrFixedClip&, bool insideStencilMask, GrRenderTarget*);
/**
* Discards the contents render target. nullptr indicates that the current render target should
* be discarded.
@@ -86,9 +87,11 @@ private:
int meshCount) = 0;
// overridden by backend-specific derived class to perform the clear.
- virtual void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) = 0;
+ virtual void onClear(GrRenderTarget*, const GrFixedClip&, GrColor) = 0;
- virtual void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideClip) = 0;
+ virtual void onClearStencilClip(GrRenderTarget*,
+ const GrFixedClip&,
+ bool insideStencilMask) = 0;
};