Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: src/gpu/batches/GrClearBatch.h

Issue 2237633003: Avoid creating full screen clear batches when there is already one in the queue. (Closed) Base URL: https://chromium.googlesource.com/skia.git@clear
Patch Set: use sk_sp<GrClearBatch> Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrClearBatch.h
diff --git a/src/gpu/batches/GrClearBatch.h b/src/gpu/batches/GrClearBatch.h
index 00a1c84de653cfb5d811fb2c2374444be990286a..8ebf85af2e882abf7b06ce7aa0c287b63db35e87 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())
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698