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

Unified Diff: include/gpu/GrContext.h

Issue 732693002: Drawstate on stack (Closed) Base URL: https://skia.googlesource.com/skia.git@real_def_gp
Patch Set: ready Created 6 years, 1 month 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
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 97acda1e795a4cc540525d65c805b5d3fd18c3c3..a081699a582b557398c69e2cad9d6ec20b8e020e 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -900,9 +900,10 @@ public:
GrStencilBuffer* findAndRefStencilBuffer(int width, int height, int sampleCnt);
GrPathRenderer* getPathRenderer(
+ const GrDrawTarget* target,
+ const GrDrawState*,
const SkPath& path,
const SkStrokeRec& stroke,
- const GrDrawTarget* target,
bool allowSW,
GrPathRendererChain::DrawType drawType = GrPathRendererChain::kColor_DrawType,
GrPathRendererChain::StencilSupport* stencilSupport = NULL);
@@ -946,7 +947,6 @@ private:
SkMatrix fViewMatrix;
SkAutoTUnref<GrRenderTarget> fRenderTarget;
const GrClipData* fClip; // TODO: make this ref counted
- GrDrawState* fDrawState;
GrResourceCache* fResourceCache;
GrResourceCache2* fResourceCache2;
@@ -988,14 +988,16 @@ private:
void setupDrawBuffer();
- class AutoRestoreEffects;
class AutoCheckFlush;
/// Sets the paint and returns the target to draw into. The paint can be NULL in which case the
/// draw state is left unmodified.
- GrDrawTarget* prepareToDraw(const GrPaint*, AutoRestoreEffects*, AutoCheckFlush*);
+ GrDrawTarget* prepareToDraw(GrDrawState* ds, const GrPaint* paint, const AutoCheckFlush*);
- void internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path,
- const GrStrokeInfo& stroke);
+ void internalDrawPath(GrDrawTarget*,
+ GrDrawState*,
+ bool useAA,
+ const SkPath&,
+ const GrStrokeInfo&);
GrTexture* createResizedTexture(const GrSurfaceDesc& desc,
const GrCacheID& cacheID,

Powered by Google App Engine
This is Rietveld 408576698