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

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

Issue 683673002: clear stencil clip on draw target (Closed) Base URL: https://skia.googlesource.com/skia.git@aa_rect_takes_gpu
Patch Set: rebase 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
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt, 128 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt,
129 int width, 129 int width,
130 int height) SK_OVERRIDE; 130 int height) SK_OVERRIDE;
131 virtual bool attachStencilBufferToRenderTarget( 131 virtual bool attachStencilBufferToRenderTarget(
132 GrStencilBuffer* sb, 132 GrStencilBuffer* sb,
133 GrRenderTarget* rt) SK_OVERRIDE; 133 GrRenderTarget* rt) SK_OVERRIDE;
134 134
135 virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, 135 virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
136 bool canIgnoreRect) SK_OVERRIDE; 136 bool canIgnoreRect) SK_OVERRIDE;
137 137
138 virtual void onClearStencilClip(GrRenderTarget*,
139 const SkIRect& rect,
140 bool insideClip) SK_OVERRIDE;
141
138 virtual bool onReadPixels(GrRenderTarget* target, 142 virtual bool onReadPixels(GrRenderTarget* target,
139 int left, int top, 143 int left, int top,
140 int width, int height, 144 int width, int height,
141 GrPixelConfig, 145 GrPixelConfig,
142 void* buffer, 146 void* buffer,
143 size_t rowBytes) SK_OVERRIDE; 147 size_t rowBytes) SK_OVERRIDE;
144 148
145 virtual bool onWriteTexturePixels(GrTexture* texture, 149 virtual bool onWriteTexturePixels(GrTexture* texture,
146 int left, int top, int width, int height, 150 int left, int top, int width, int height,
147 GrPixelConfig config, const void* buffer, 151 GrPixelConfig config, const void* buffer,
148 size_t rowBytes) SK_OVERRIDE; 152 size_t rowBytes) SK_OVERRIDE;
149 153
150 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; 154 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE;
151 155
152 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; 156 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE;
153 157
154 158
155 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; 159 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE;
156 virtual void clearStencilClip(GrRenderTarget*, const SkIRect& rect,
157 bool insideClip) SK_OVERRIDE;
158 virtual bool flushGraphicsState(DrawType, 160 virtual bool flushGraphicsState(DrawType,
159 const ScissorState&, 161 const GrClipMaskManager::ScissorState&,
160 const GrDeviceCoordTexture* dstCopy) SK_OVER RIDE; 162 const GrDeviceCoordTexture* dstCopy) SK_OVER RIDE;
161 163
162 // GrDrawTarget overrides 164 // GrDrawTarget overrides
163 virtual void didAddGpuTraceMarker() SK_OVERRIDE; 165 virtual void didAddGpuTraceMarker() SK_OVERRIDE;
164 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; 166 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE;
165 167
166 // binds texture unit in GL 168 // binds texture unit in GL
167 void setTextureUnit(int unitIdx); 169 void setTextureUnit(int unitIdx);
168 170
169 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt es gives the offset 171 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt es gives the offset
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 int fCacheMisses; 222 int fCacheMisses;
221 int fHashMisses; // cache hit but hash table mis sed 223 int fHashMisses; // cache hit but hash table mis sed
222 #endif 224 #endif
223 }; 225 };
224 226
225 // flushes dithering, color-mask, and face culling stat 227 // flushes dithering, color-mask, and face culling stat
226 void flushMiscFixedFunctionState(const GrOptDrawState&); 228 void flushMiscFixedFunctionState(const GrOptDrawState&);
227 229
228 // flushes the scissor. see the note on flushBoundTextureAndParams about 230 // flushes the scissor. see the note on flushBoundTextureAndParams about
229 // flushing the scissor after that function is called. 231 // flushing the scissor after that function is called.
230 void flushScissor(const ScissorState&, 232 void flushScissor(const GrClipMaskManager::ScissorState&,
231 const GrGLIRect& rtViewport, 233 const GrGLIRect& rtViewport,
232 GrSurfaceOrigin rtOrigin); 234 GrSurfaceOrigin rtOrigin);
233 235
234 // disables the scissor 236 // disables the scissor
235 void disableScissor(); 237 void disableScissor();
236 238
237 void initFSAASupport(); 239 void initFSAASupport();
238 240
239 // determines valid stencil formats 241 // determines valid stencil formats
240 void initStencilFormats(); 242 void initStencilFormats();
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 452
451 // we record what stencil format worked last time to hopefully exit early 453 // we record what stencil format worked last time to hopefully exit early
452 // from our loop that tries stencil formats and calls check fb status. 454 // from our loop that tries stencil formats and calls check fb status.
453 int fLastSuccessfulStencilFmtIdx; 455 int fLastSuccessfulStencilFmtIdx;
454 456
455 typedef GrGpu INHERITED; 457 typedef GrGpu INHERITED;
456 friend class GrGLPathRendering; // For accessing setTextureUnit. 458 friend class GrGLPathRendering; // For accessing setTextureUnit.
457 }; 459 };
458 460
459 #endif 461 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698