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

Unified Diff: include/gpu/GrDrawContext.h

Issue 1355353002: Create GrDraw and start fast pathing src over rects (Closed) Base URL: https://skia.googlesource.com/skia.git@strokerect2
Patch Set: tweaks 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 | « gyp/gpu.gypi ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrDrawContext.h
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
index 97cb72a7f2e530166874b8998dd132b5a95653d1..96f6629ea6743aabf7852f52f804e810958438b6 100644
--- a/include/gpu/GrDrawContext.h
+++ b/include/gpu/GrDrawContext.h
@@ -12,8 +12,10 @@
#include "SkRefCnt.h"
#include "SkSurfaceProps.h"
+class GrBatch;
class GrClip;
class GrContext;
+class GrDraw;
class GrDrawBatch;
class GrDrawTarget;
class GrPaint;
@@ -259,8 +261,14 @@ public:
*/
void drawBatch(GrRenderTarget*, const GrClip&, const GrPaint&, GrDrawBatch*);
+ // This entry point is currently only used for text contexts and the experimental GrDraw
+ void drawBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawBatch* batch);
+
+ // returns the last batch, or a null pointer if none is available. This is so internal clients
+ // can fast path batching
+ GrBatch* lastBatch();
+
private:
- friend class GrAtlasTextContext; // for access to drawBatch
friend class GrContext; // for ctor
GrDrawContext(GrContext*, GrDrawTarget*, const SkSurfaceProps&);
@@ -278,10 +286,6 @@ private:
const SkPath&,
const GrStrokeInfo&);
- // This entry point allows the GrTextContext-derived classes to add their batches to
- // the drawTarget.
- void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch);
-
GrContext* fContext; // owning context -> no ref
GrDrawTarget* fDrawTarget;
GrTextContext* fTextContext; // lazily created
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698