diff options
author | 2016-08-11 11:25:33 -0700 | |
---|---|---|
committer | 2016-08-11 11:25:33 -0700 | |
commit | fd8d013f0da10d94b43fb63002e56a3f4cd7f56d (patch) | |
tree | 05145a4e59a9a7b97aaacd182405506996c0b605 /src/gpu/batches/GrClearBatch.h | |
parent | 6372e6590924c459d88fa1fae52ff996a56ee9ab (diff) |
Avoid creating full screen clear batches when there is already one in the queue.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2237633003
Review-Url: https://codereview.chromium.org/2237633003
Diffstat (limited to 'src/gpu/batches/GrClearBatch.h')
-rw-r--r-- | src/gpu/batches/GrClearBatch.h | 6 |
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()) |