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

Unified Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 963183002: Increase GrInOrderDrawBuffer's encapsulation of trace markers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review issue Created 5 years, 10 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 | « no previous file | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.h
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index 58761694b1e1904212d17b3ad8e6a408571f3a75..ccda85111d10955eebed3f19f15978ca13fbb559 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -298,9 +298,12 @@ private:
// We lazily record clip changes in order to skip clips that have no effect.
void recordClipIfNecessary();
- // Records any trace markers for a command after adding it to the buffer.
- void recordTraceMarkersIfNecessary();
-
+ // Records any trace markers for a command
+ void recordTraceMarkersIfNecessary(Cmd*);
+ SkString getCmdString(int index) const {
+ SkASSERT(index < fGpuCmdMarkers.count());
+ return fGpuCmdMarkers[index].toString();
+ }
bool isIssued(uint32_t drawID) SK_OVERRIDE { return drawID != fDrawID; }
GrBatchTarget* getBatchTarget() { return &fBatchTarget; }
@@ -324,14 +327,7 @@ private:
// This will go away when everything uses batch. However, in the short term anything which
// might be put into the GrInOrderDrawBuffer needs to make sure it closes the last batch
- void closeBatch() {
- if (fDrawBatch) {
- fBatchTarget.resetNumberOfDraws();
- fDrawBatch->execute(this->getGpu(), fPrevState);
- fDrawBatch->fBatch->setNumberOfDraws(fBatchTarget.numberOfDraws());
- fDrawBatch = NULL;
- }
- }
+ inline void closeBatch();
typedef GrFlushToGpuDrawTarget INHERITED;
};
« no previous file with comments | « no previous file | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698