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

Unified Diff: src/gpu/GrDrawTarget.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/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.h
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 60a1ec908cb4dc95208f699517cd6e6d1fb36c74..6a2c5f5c199ed775f83f643491fd0e63f3de9eb2 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -31,6 +31,7 @@
class GrAuditTrail;
class GrBatch;
+class GrClearBatch;
class GrClip;
class GrCaps;
class GrPath;
@@ -57,6 +58,7 @@ public:
~GrDrawTarget() override;
void makeClosed() {
+ fLastFullClearBatch = nullptr;
// We only close drawTargets When MDB is enabled. When MDB is disabled there is only
// ever one drawTarget and all calls will be funnelled into it.
#ifdef ENABLE_MDB
@@ -194,7 +196,9 @@ private:
}
};
- void recordBatch(GrBatch*, const SkRect& clippedBounds);
+ // Returns the batch that the input batch was combined with or the input batch if it wasn't
+ // combined.
+ GrBatch* recordBatch(GrBatch*, const SkRect& clippedBounds);
void forwardCombine();
// Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required
@@ -217,6 +221,7 @@ private:
SkRect fClippedBounds;
};
SkSTArray<256, RecordedBatch, true> fRecordedBatches;
+ GrClearBatch* fLastFullClearBatch;
// The context is only in service of the GrClip, remove once it doesn't need this.
GrContext* fContext;
GrGpu* fGpu;
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698