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

Side by Side Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 13468004: Make drawRect preserve vertex attrib state and push/pop the geom sources. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 bool flush(); 69 bool flush();
70 70
71 bool isFlushing() const { return fFlushing; } 71 bool isFlushing() const { return fFlushing; }
72 72
73 // overrides from GrDrawTarget 73 // overrides from GrDrawTarget
74 virtual bool geometryHints(int* vertexCount, 74 virtual bool geometryHints(int* vertexCount,
75 int* indexCount) const SK_OVERRIDE; 75 int* indexCount) const SK_OVERRIDE;
76 virtual void clear(const GrIRect* rect, 76 virtual void clear(const GrIRect* rect,
77 GrColor color, 77 GrColor color,
78 GrRenderTarget* renderTarget = NULL) SK_OVERRIDE; 78 GrRenderTarget* renderTarget = NULL) SK_OVERRIDE;
79 virtual void drawRect(const GrRect& rect,
80 const SkMatrix* matrix,
81 const GrRect* localRect,
82 const SkMatrix* localMatrix) SK_OVERRIDE;
83 79
84 protected: 80 protected:
85 virtual void clipWillBeSet(const GrClipData* newClip) SK_OVERRIDE; 81 virtual void clipWillBeSet(const GrClipData* newClip) SK_OVERRIDE;
86 82
87 private: 83 private:
88 enum Cmd { 84 enum Cmd {
89 kDraw_Cmd = 1, 85 kDraw_Cmd = 1,
90 kStencilPath_Cmd = 2, 86 kStencilPath_Cmd = 2,
91 kSetState_Cmd = 3, 87 kSetState_Cmd = 3,
92 kSetClip_Cmd = 4, 88 kSetClip_Cmd = 4,
(...skipping 19 matching lines...) Expand all
112 Clear() : fRenderTarget(NULL) {} 108 Clear() : fRenderTarget(NULL) {}
113 ~Clear() { GrSafeUnref(fRenderTarget); } 109 ~Clear() { GrSafeUnref(fRenderTarget); }
114 110
115 GrIRect fRect; 111 GrIRect fRect;
116 GrColor fColor; 112 GrColor fColor;
117 GrRenderTarget* fRenderTarget; 113 GrRenderTarget* fRenderTarget;
118 }; 114 };
119 115
120 // overrides from GrDrawTarget 116 // overrides from GrDrawTarget
121 virtual void onDraw(const DrawInfo&) SK_OVERRIDE; 117 virtual void onDraw(const DrawInfo&) SK_OVERRIDE;
118 virtual void onDrawRect(const GrRect& rect,
119 const SkMatrix* matrix,
120 const GrRect* localRect,
121 const SkMatrix* localMatrix) SK_OVERRIDE;
122 virtual void onStencilPath(const GrPath*, const SkStrokeRec& stroke, SkPath: :FillType) SK_OVERRIDE; 122 virtual void onStencilPath(const GrPath*, const SkStrokeRec& stroke, SkPath: :FillType) SK_OVERRIDE;
123 virtual bool onReserveVertexSpace(size_t vertexSize, 123 virtual bool onReserveVertexSpace(size_t vertexSize,
124 int vertexCount, 124 int vertexCount,
125 void** vertices) SK_OVERRIDE; 125 void** vertices) SK_OVERRIDE;
126 virtual bool onReserveIndexSpace(int indexCount, 126 virtual bool onReserveIndexSpace(int indexCount,
127 void** indices) SK_OVERRIDE; 127 void** indices) SK_OVERRIDE;
128 virtual void releaseReservedVertexSpace() SK_OVERRIDE; 128 virtual void releaseReservedVertexSpace() SK_OVERRIDE;
129 virtual void releaseReservedIndexSpace() SK_OVERRIDE; 129 virtual void releaseReservedIndexSpace() SK_OVERRIDE;
130 virtual void onSetVertexSourceToArray(const void* vertexArray, 130 virtual void onSetVertexSourceToArray(const void* vertexArray,
131 int vertexCount) SK_OVERRIDE; 131 int vertexCount) SK_OVERRIDE;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 size_t fUsedPoolIndexBytes; 202 size_t fUsedPoolIndexBytes;
203 }; 203 };
204 SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> fGeoPoolStateStack; 204 SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> fGeoPoolStateStack;
205 205
206 bool fFlushing; 206 bool fFlushing;
207 207
208 typedef GrDrawTarget INHERITED; 208 typedef GrDrawTarget INHERITED;
209 }; 209 };
210 210
211 #endif 211 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698