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

Unified Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 732693002: Drawstate on stack (Closed) Base URL: https://skia.googlesource.com/skia.git@real_def_gp
Patch Set: tiny fix 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
« no previous file with comments | « src/gpu/GrGpu.h ('k') | 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 4129d0a4dce45c192e8731d4e8cdcdff67842927..c89823636bc093f6610580483954f6ffd31ff86a 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -73,7 +73,8 @@ public:
virtual DrawToken getCurrentDrawToken() { return DrawToken(this, fDrawID); }
// overrides from GrDrawTarget
- virtual bool geometryHints(int* vertexCount,
+ virtual bool geometryHints(size_t vertexStride,
+ int* vertexCount,
int* indexCount) const SK_OVERRIDE;
virtual bool copySurface(GrSurface* dst,
@@ -81,8 +82,8 @@ public:
const SkIRect& srcRect,
const SkIPoint& dstPoint) SK_OVERRIDE;
- virtual bool canCopySurface(GrSurface* dst,
- GrSurface* src,
+ virtual bool canCopySurface(const GrSurface* dst,
+ const GrSurface* src,
const SkIRect& srcRect,
const SkIPoint& dstPoint) SK_OVERRIDE;
@@ -248,19 +249,25 @@ private:
typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer;
// overrides from GrDrawTarget
- virtual void onDraw(const DrawInfo&, const GrClipMaskManager::ScissorState&) SK_OVERRIDE;
- virtual void onDrawRect(const SkRect& rect,
+ virtual void onDraw(const GrDrawState&,
+ const DrawInfo&,
+ const GrClipMaskManager::ScissorState&) SK_OVERRIDE;
+ virtual void onDrawRect(GrDrawState*,
+ const SkRect& rect,
const SkRect* localRect,
const SkMatrix* localMatrix) SK_OVERRIDE;
- virtual void onStencilPath(const GrPath*,
+ virtual void onStencilPath(const GrDrawState&,
+ const GrPath*,
const GrClipMaskManager::ScissorState&,
const GrStencilSettings&) SK_OVERRIDE;
- virtual void onDrawPath(const GrPath*,
+ virtual void onDrawPath(const GrDrawState&,
+ const GrPath*,
const GrClipMaskManager::ScissorState&,
const GrStencilSettings&,
const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
- virtual void onDrawPaths(const GrPathRange*,
+ virtual void onDrawPaths(const GrDrawState&,
+ const GrPathRange*,
const uint32_t indices[],
int count,
const float transforms[],
@@ -283,14 +290,17 @@ private:
virtual void geometrySourceWillPush() SK_OVERRIDE;
virtual void geometrySourceWillPop(const GeometrySrcState& restoredState) SK_OVERRIDE;
virtual void willReserveVertexAndIndexSpace(int vertexCount,
+ size_t vertexStride,
int indexCount) SK_OVERRIDE;
// Attempts to concat instances from info onto the previous draw. info must represent an
// instanced draw. The caller must have already recorded a new draw state and clip if necessary.
- int concatInstancedDraw(const DrawInfo& info, const GrClipMaskManager::ScissorState&);
+ int concatInstancedDraw(const GrDrawState&,
+ const DrawInfo&,
+ const GrClipMaskManager::ScissorState&);
// Determines whether the current draw operation requieres a new drawstate and if so records it.
- void recordStateIfNecessary(GrGpu::DrawType, const GrDeviceCoordTexture*);
+ void recordStateIfNecessary(const GrDrawState&, GrGpu::DrawType, const GrDeviceCoordTexture*);
// 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.
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698