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

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

Issue 533883004: Remove GrDrawTarget::AutoRenderTargetRestore. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: pass rt to clearStencilClip Created 6 years, 3 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
« no previous file with comments | « src/gpu/GrRODrawState.h ('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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVE RRIDE; 118 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVE RRIDE;
119 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVER RIDE; 119 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVER RIDE;
120 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge tDesc&) SK_OVERRIDE; 120 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge tDesc&) SK_OVERRIDE;
121 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt, 121 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt,
122 int width, 122 int width,
123 int height) SK_OVERRIDE; 123 int height) SK_OVERRIDE;
124 virtual bool attachStencilBufferToRenderTarget( 124 virtual bool attachStencilBufferToRenderTarget(
125 GrStencilBuffer* sb, 125 GrStencilBuffer* sb,
126 GrRenderTarget* rt) SK_OVERRIDE; 126 GrRenderTarget* rt) SK_OVERRIDE;
127 127
128 virtual void onClear(const SkIRect* rect, GrColor color, bool canIgnoreRect) SK_OVERRIDE; 128 virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
129 bool canIgnoreRect) SK_OVERRIDE;
129 130
130 virtual bool onReadPixels(GrRenderTarget* target, 131 virtual bool onReadPixels(GrRenderTarget* target,
131 int left, int top, 132 int left, int top,
132 int width, int height, 133 int width, int height,
133 GrPixelConfig, 134 GrPixelConfig,
134 void* buffer, 135 void* buffer,
135 size_t rowBytes) SK_OVERRIDE; 136 size_t rowBytes) SK_OVERRIDE;
136 137
137 virtual bool onWriteTexturePixels(GrTexture* texture, 138 virtual bool onWriteTexturePixels(GrTexture* texture,
138 int left, int top, int width, int height, 139 int left, int top, int width, int height,
139 GrPixelConfig config, const void* buffer, 140 GrPixelConfig config, const void* buffer,
140 size_t rowBytes) SK_OVERRIDE; 141 size_t rowBytes) SK_OVERRIDE;
141 142
142 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; 143 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE;
143 144
144 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; 145 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE;
145 146
146 147
147 virtual void clearStencil() SK_OVERRIDE; 148 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE;
148 virtual void clearStencilClip(const SkIRect& rect, 149 virtual void clearStencilClip(GrRenderTarget*, const SkIRect& rect,
149 bool insideClip) SK_OVERRIDE; 150 bool insideClip) SK_OVERRIDE;
150 virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCop y) SK_OVERRIDE; 151 virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCop y) SK_OVERRIDE;
151 152
152 // GrDrawTarget ovverides 153 // GrDrawTarget ovverides
153 virtual void didAddGpuTraceMarker() SK_OVERRIDE; 154 virtual void didAddGpuTraceMarker() SK_OVERRIDE;
154 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; 155 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE;
155 156
156 // binds texture unit in GL 157 // binds texture unit in GL
157 void setTextureUnit(int unitIdx); 158 void setTextureUnit(int unitIdx);
158 159
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 int fCacheMisses; 212 int fCacheMisses;
212 int fHashMisses; // cache hit but hash table mis sed 213 int fHashMisses; // cache hit but hash table mis sed
213 #endif 214 #endif
214 }; 215 };
215 216
216 // flushes dithering, color-mask, and face culling stat 217 // flushes dithering, color-mask, and face culling stat
217 void flushMiscFixedFunctionState(); 218 void flushMiscFixedFunctionState();
218 219
219 // flushes the scissor. see the note on flushBoundTextureAndParams about 220 // flushes the scissor. see the note on flushBoundTextureAndParams about
220 // flushing the scissor after that function is called. 221 // flushing the scissor after that function is called.
221 void flushScissor(); 222 void flushScissor(const GrGLIRect& rtViewport, GrSurfaceOrigin rtOrigin);
egdaniel 2014/09/03 13:34:35 why not pass in glrt like other functions, to stay
bsalomon 2014/09/03 13:49:46 Because we have places where we are setting scisso
222 223
223 void initFSAASupport(); 224 void initFSAASupport();
224 225
225 // determines valid stencil formats 226 // determines valid stencil formats
226 void initStencilFormats(); 227 void initStencilFormats();
227 228
228 // sets a texture unit to use for texture operations other than binding a te xture to a program. 229 // sets a texture unit to use for texture operations other than binding a te xture to a program.
229 // ensures that such operations don't negatively interact with tracking boun d textures. 230 // ensures that such operations don't negatively interact with tracking boun d textures.
230 void setScratchTextureUnit(); 231 void setScratchTextureUnit();
231 232
232 // bound is region that may be modified and therefore has to be resolved. 233 // bounds is region that may be modified and therefore has to be resolved.
233 // NULL means whole target. Can be an empty rect. 234 // NULL means whole target. Can be an empty rect.
234 void flushRenderTarget(const SkIRect* bound); 235 void flushRenderTarget(GrGLRenderTarget*, const SkIRect* bounds);
236
235 void flushStencil(DrawType); 237 void flushStencil(DrawType);
236 void flushAAState(DrawType); 238 void flushAAState(DrawType);
237 239
238 bool configToGLFormats(GrPixelConfig config, 240 bool configToGLFormats(GrPixelConfig config,
239 bool getSizedInternal, 241 bool getSizedInternal,
240 GrGLenum* internalFormat, 242 GrGLenum* internalFormat,
241 GrGLenum* externalFormat, 243 GrGLenum* externalFormat,
242 GrGLenum* externalType); 244 GrGLenum* externalType);
243 // helper for onCreateTexture and writeTexturePixels 245 // helper for onCreateTexture and writeTexturePixels
244 bool uploadTexData(const GrGLTexture::Desc& desc, 246 bool uploadTexData(const GrGLTexture::Desc& desc,
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 437
436 // we record what stencil format worked last time to hopefully exit early 438 // we record what stencil format worked last time to hopefully exit early
437 // from our loop that tries stencil formats and calls check fb status. 439 // from our loop that tries stencil formats and calls check fb status.
438 int fLastSuccessfulStencilFmtIdx; 440 int fLastSuccessfulStencilFmtIdx;
439 441
440 typedef GrGpu INHERITED; 442 typedef GrGpu INHERITED;
441 friend class GrGLPathRendering; // For accessing setTextureUnit. 443 friend class GrGLPathRendering; // For accessing setTextureUnit.
442 }; 444 };
443 445
444 #endif 446 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrRODrawState.h ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698