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

Side by Side Diff: src/gpu/gl/GrGpuGL.h

Issue 678683005: Scissor rect on drawinfo (Closed) Base URL: https://skia.googlesource.com/skia.git@clip_to_target
Patch Set: feedback inc 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrGpuGL_DEFINED 8 #ifndef GrGpuGL_DEFINED
9 #define GrGpuGL_DEFINED 9 #define GrGpuGL_DEFINED
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 size_t rowBytes) SK_OVERRIDE; 141 size_t rowBytes) SK_OVERRIDE;
142 142
143 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; 143 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE;
144 144
145 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; 145 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE;
146 146
147 147
148 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; 148 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE;
149 virtual void clearStencilClip(GrRenderTarget*, const SkIRect& rect, 149 virtual void clearStencilClip(GrRenderTarget*, const SkIRect& rect,
150 bool insideClip) SK_OVERRIDE; 150 bool insideClip) SK_OVERRIDE;
151 virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCop y) SK_OVERRIDE; 151 virtual bool flushGraphicsState(const DrawInfo&,
152 DrawType,
153 const GrDeviceCoordTexture* dstCopy) SK_OVER RIDE;
152 154
153 // GrDrawTarget overrides 155 // GrDrawTarget overrides
154 virtual void didAddGpuTraceMarker() SK_OVERRIDE; 156 virtual void didAddGpuTraceMarker() SK_OVERRIDE;
155 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; 157 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE;
156 158
157 // binds texture unit in GL 159 // binds texture unit in GL
158 void setTextureUnit(int unitIdx); 160 void setTextureUnit(int unitIdx);
159 161
160 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt es gives the offset 162 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt es gives the offset
161 // an into the index buffer. It does not account for drawInfo.startIndex() b ut rather the start 163 // an into the index buffer. It does not account for drawInfo.startIndex() b ut rather the start
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 int fCacheMisses; 215 int fCacheMisses;
214 int fHashMisses; // cache hit but hash table mis sed 216 int fHashMisses; // cache hit but hash table mis sed
215 #endif 217 #endif
216 }; 218 };
217 219
218 // flushes dithering, color-mask, and face culling stat 220 // flushes dithering, color-mask, and face culling stat
219 void flushMiscFixedFunctionState(const GrOptDrawState&); 221 void flushMiscFixedFunctionState(const GrOptDrawState&);
220 222
221 // flushes the scissor. see the note on flushBoundTextureAndParams about 223 // flushes the scissor. see the note on flushBoundTextureAndParams about
222 // flushing the scissor after that function is called. 224 // flushing the scissor after that function is called.
223 void flushScissor(const GrGLIRect& rtViewport, GrSurfaceOrigin rtOrigin); 225 void flushScissor(const DrawInfo::ScissorState&,
226 const GrGLIRect& rtViewport,
227 GrSurfaceOrigin rtOrigin);
224 228
225 void initFSAASupport(); 229 void initFSAASupport();
226 230
227 // determines valid stencil formats 231 // determines valid stencil formats
228 void initStencilFormats(); 232 void initStencilFormats();
229 233
230 // sets a texture unit to use for texture operations other than binding a te xture to a program. 234 // sets a texture unit to use for texture operations other than binding a te xture to a program.
231 // ensures that such operations don't negatively interact with tracking boun d textures. 235 // ensures that such operations don't negatively interact with tracking boun d textures.
232 void setScratchTextureUnit(); 236 void setScratchTextureUnit();
233 237
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 444
441 // we record what stencil format worked last time to hopefully exit early 445 // we record what stencil format worked last time to hopefully exit early
442 // from our loop that tries stencil formats and calls check fb status. 446 // from our loop that tries stencil formats and calls check fb status.
443 int fLastSuccessfulStencilFmtIdx; 447 int fLastSuccessfulStencilFmtIdx;
444 448
445 typedef GrGpu INHERITED; 449 typedef GrGpu INHERITED;
446 friend class GrGLPathRendering; // For accessing setTextureUnit. 450 friend class GrGLPathRendering; // For accessing setTextureUnit.
447 }; 451 };
448 452
449 #endif 453 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698