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

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

Issue 22686002: Implement path cover with nv_path_rendering (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix a comment Created 7 years, 2 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
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 virtual bool onWriteTexturePixels(GrTexture* texture, 145 virtual bool onWriteTexturePixels(GrTexture* texture,
146 int left, int top, int width, int height, 146 int left, int top, int width, int height,
147 GrPixelConfig config, const void* buffer, 147 GrPixelConfig config, const void* buffer,
148 size_t rowBytes) SK_OVERRIDE; 148 size_t rowBytes) SK_OVERRIDE;
149 149
150 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; 150 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE;
151 151
152 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; 152 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE;
153 153
154 virtual void setStencilPathSettings(const GrPath&,
155 SkPath::FillType,
156 GrStencilSettings* settings)
157 SK_OVERRIDE;
158 virtual void onGpuStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE; 154 virtual void onGpuStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
155 virtual void onGpuFillPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
159 156
160 virtual void clearStencil() SK_OVERRIDE; 157 virtual void clearStencil() SK_OVERRIDE;
161 virtual void clearStencilClip(const SkIRect& rect, 158 virtual void clearStencilClip(const SkIRect& rect,
162 bool insideClip) SK_OVERRIDE; 159 bool insideClip) SK_OVERRIDE;
163 virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCop y) SK_OVERRIDE; 160 virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCop y) SK_OVERRIDE;
164 161
165 // binds texture unit in GL 162 // binds texture unit in GL
166 void setTextureUnit(int unitIdx); 163 void setTextureUnit(int unitIdx);
167 164
168 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt es gives the offset 165 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt es gives the offset
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 235
239 // sets a texture unit to use for texture operations other than binding a te xture to a program. 236 // sets a texture unit to use for texture operations other than binding a te xture to a program.
240 // ensures that such operations don't negatively interact with tracking boun d textures. 237 // ensures that such operations don't negatively interact with tracking boun d textures.
241 void setScratchTextureUnit(); 238 void setScratchTextureUnit();
242 239
243 // bound is region that may be modified and therefore has to be resolved. 240 // bound is region that may be modified and therefore has to be resolved.
244 // NULL means whole target. Can be an empty rect. 241 // NULL means whole target. Can be an empty rect.
245 void flushRenderTarget(const SkIRect* bound); 242 void flushRenderTarget(const SkIRect* bound);
246 void flushStencil(DrawType); 243 void flushStencil(DrawType);
247 void flushAAState(DrawType); 244 void flushAAState(DrawType);
245 void flushPathStencilSettings(SkPath::FillType fill);
248 246
249 bool configToGLFormats(GrPixelConfig config, 247 bool configToGLFormats(GrPixelConfig config,
250 bool getSizedInternal, 248 bool getSizedInternal,
251 GrGLenum* internalFormat, 249 GrGLenum* internalFormat,
252 GrGLenum* externalFormat, 250 GrGLenum* externalFormat,
253 GrGLenum* externalType); 251 GrGLenum* externalType);
254 // helper for onCreateTexture and writeTexturePixels 252 // helper for onCreateTexture and writeTexturePixels
255 bool uploadTexData(const GrGLTexture::Desc& desc, 253 bool uploadTexData(const GrGLTexture::Desc& desc,
256 bool isNewTexture, 254 bool isNewTexture,
257 int left, int top, int width, int height, 255 int left, int top, int width, int height,
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 fMSAAEnabled = kUnknown_TriState; 425 fMSAAEnabled = kUnknown_TriState;
428 fSmoothLineEnabled = kUnknown_TriState; 426 fSmoothLineEnabled = kUnknown_TriState;
429 } 427 }
430 } fHWAAState; 428 } fHWAAState;
431 429
432 430
433 GrGLProgram::MatrixState fHWProjectionMatrixState; 431 GrGLProgram::MatrixState fHWProjectionMatrixState;
434 432
435 GrStencilSettings fHWStencilSettings; 433 GrStencilSettings fHWStencilSettings;
436 TriState fHWStencilTestEnabled; 434 TriState fHWStencilTestEnabled;
435 GrStencilSettings fHWPathStencilSettings;
437 436
438 GrDrawState::DrawFace fHWDrawFace; 437 GrDrawState::DrawFace fHWDrawFace;
439 TriState fHWWriteToColor; 438 TriState fHWWriteToColor;
440 TriState fHWDitherEnabled; 439 TriState fHWDitherEnabled;
441 GrRenderTarget* fHWBoundRenderTarget; 440 GrRenderTarget* fHWBoundRenderTarget;
442 SkTArray<GrTexture*, true> fHWBoundTextures; 441 SkTArray<GrTexture*, true> fHWBoundTextures;
443 442
444 struct TexGenData { 443 struct TexGenData {
445 GrGLenum fMode; 444 GrGLenum fMode;
446 GrGLint fNumComponents; 445 GrGLint fNumComponents;
447 GrGLfloat fCoefficients[3 * 3]; 446 GrGLfloat fCoefficients[3 * 3];
448 }; 447 };
449 int fHWActiveTexGenSets; 448 int fHWActiveTexGenSets;
450 SkTArray<TexGenData, true> fHWTexGenSettings; 449 SkTArray<TexGenData, true> fHWTexGenSettings;
451 ///@} 450 ///@}
452 451
453 // we record what stencil format worked last time to hopefully exit early 452 // we record what stencil format worked last time to hopefully exit early
454 // from our loop that tries stencil formats and calls check fb status. 453 // from our loop that tries stencil formats and calls check fb status.
455 int fLastSuccessfulStencilFmtIdx; 454 int fLastSuccessfulStencilFmtIdx;
456 455
457 typedef GrGpu INHERITED; 456 typedef GrGpu INHERITED;
458 }; 457 };
459 458
460 #endif 459 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698