aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrClearBatch.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-08-11 11:25:33 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-11 11:25:33 -0700
commitfd8d013f0da10d94b43fb63002e56a3f4cd7f56d (patch)
tree05145a4e59a9a7b97aaacd182405506996c0b605 /src/gpu/batches/GrClearBatch.h
parent6372e6590924c459d88fa1fae52ff996a56ee9ab (diff)
Avoid creating full screen clear batches when there is already one in the queue.
Diffstat (limited to 'src/gpu/batches/GrClearBatch.h')
-rw-r--r--src/gpu/batches/GrClearBatch.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/batches/GrClearBatch.h b/src/gpu/batches/GrClearBatch.h
index 00a1c84de6..8ebf85af2e 100644
--- a/src/gpu/batches/GrClearBatch.h
+++ b/src/gpu/batches/GrClearBatch.h
@@ -18,8 +18,8 @@ class GrClearBatch final : public GrBatch {
public:
DEFINE_BATCH_CLASS_ID
- static sk_sp<GrBatch> Make(const SkIRect& rect, GrColor color, GrRenderTarget* rt) {
- return sk_sp<GrBatch>(new GrClearBatch(rect, color, rt));
+ static sk_sp<GrClearBatch> Make(const SkIRect& rect, GrColor color, GrRenderTarget* rt) {
+ return sk_sp<GrClearBatch>(new GrClearBatch(rect, color, rt));
}
const char* name() const override { return "Clear"; }
@@ -36,6 +36,8 @@ public:
return string;
}
+ void setColor(GrColor color) { fColor = color; }
+
private:
GrClearBatch(const SkIRect& rect, GrColor color, GrRenderTarget* rt)
: INHERITED(ClassID())