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

Unified Diff: src/gpu/GrDrawTarget.h

Issue 1315513008: Cleanup GrDrawTarget now that all paths lead to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@patharray
Patch Set: remove change to SampleApp.cpp Created 5 years, 3 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/GrContext.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 13f35ac7680b801e969dbc823ff83bd2db727ba6..15024cd95e94194a72e085588f41a4ae0f786c33 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -39,23 +39,16 @@ class GrPathRangeDraw;
class GrDrawTarget : public SkRefCnt {
public:
-
-
- typedef GrPathRange::PathIndexType PathIndexType;
- typedef GrPathRendering::PathTransformType PathTransformType;
-
- ///////////////////////////////////////////////////////////////////////////
-
// The context may not be fully constructed and should not be used during GrDrawTarget
// construction.
GrDrawTarget(GrGpu* gpu, GrResourceProvider*);
- virtual ~GrDrawTarget();
+ ~GrDrawTarget() override;
/**
* Empties the draw buffer of any queued up draws.
*/
- void reset() { this->onReset(); }
+ void reset();
/**
* This plays any queued up draws to its GrGpu target. It also resets this object (i.e. flushing
@@ -211,12 +204,10 @@ protected:
GrXferProcessor::DstTexture*,
const SkRect* drawBounds);
- virtual void onDrawBatch(GrBatch*) = 0;
+ void recordBatch(GrBatch*);
private:
- virtual void onReset() = 0;
-
- virtual void onFlush() = 0;
+ SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches;
void drawPathBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawPathBatchBase* batch,
GrPathRendering::FillType fill);
@@ -235,6 +226,7 @@ private:
const GrCaps* fCaps;
GrResourceProvider* fResourceProvider;
bool fFlushing;
+ GrBatchToken fLastFlushToken;
typedef SkRefCnt INHERITED;
};
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698