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

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

Issue 2182783004: Add test configs for instanced rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add test configs for instanced rendering Created 4 years, 4 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/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLGpu.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 GrGLGpu_DEFINED 8 #ifndef GrGLGpu_DEFINED
9 #define GrGLGpu_DEFINED 9 #define GrGLGpu_DEFINED
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 GrGLStandard glStandard() const { return fGLContext->standard(); } 48 GrGLStandard glStandard() const { return fGLContext->standard(); }
49 GrGLVersion glVersion() const { return fGLContext->version(); } 49 GrGLVersion glVersion() const { return fGLContext->version(); }
50 GrGLSLGeneration glslGeneration() const { return fGLContext->glslGeneration( ); } 50 GrGLSLGeneration glslGeneration() const { return fGLContext->glslGeneration( ); }
51 const GrGLCaps& glCaps() const { return *fGLContext->caps(); } 51 const GrGLCaps& glCaps() const { return *fGLContext->caps(); }
52 52
53 GrGLPathRendering* glPathRendering() { 53 GrGLPathRendering* glPathRendering() {
54 SkASSERT(glCaps().shaderCaps()->pathRenderingSupport()); 54 SkASSERT(glCaps().shaderCaps()->pathRenderingSupport());
55 return static_cast<GrGLPathRendering*>(pathRendering()); 55 return static_cast<GrGLPathRendering*>(pathRendering());
56 } 56 }
57 57
58 gr_instanced::InstancedRendering* createInstancedRenderingIfSupported() over ride;
59
60 // Used by GrGLProgram to configure OpenGL state. 58 // Used by GrGLProgram to configure OpenGL state.
61 void bindTexture(int unitIdx, const GrTextureParams& params, bool allowSRGBI nputs, 59 void bindTexture(int unitIdx, const GrTextureParams& params, bool allowSRGBI nputs,
62 GrGLTexture* texture); 60 GrGLTexture* texture);
63 61
64 void bindTexelBuffer(int unitIdx, GrPixelConfig, GrGLBuffer*); 62 void bindTexelBuffer(int unitIdx, GrPixelConfig, GrGLBuffer*);
65 63
66 void generateMipmaps(const GrTextureParams& params, bool allowSRGBInputs, Gr GLTexture* texture); 64 void generateMipmaps(const GrTextureParams& params, bool allowSRGBInputs, Gr GLTexture* texture);
67 65
68 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes, 66 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes,
69 GrPixelConfig readConfig, DrawPreference*, 67 GrPixelConfig readConfig, DrawPreference*,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, 156 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc,
159 SkBudgeted budgeted, 157 SkBudgeted budgeted,
160 const SkTArray<GrMipLevel>& texels) ove rride; 158 const SkTArray<GrMipLevel>& texels) ove rride;
161 159
162 GrBuffer* onCreateBuffer(size_t size, GrBufferType intendedType, GrAccessPat tern, 160 GrBuffer* onCreateBuffer(size_t size, GrBufferType intendedType, GrAccessPat tern,
163 const void* data) override; 161 const void* data) override;
164 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership ) override; 162 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership ) override;
165 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, 163 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&,
166 GrWrapOwnership) override; 164 GrWrapOwnership) override;
167 GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTextureDes c&) override; 165 GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTextureDes c&) override;
166
167 gr_instanced::InstancedRendering* onCreateInstancedRendering() override;
168
168 // Given a GrPixelConfig return the index into the stencil format array on G rGLCaps to a 169 // Given a GrPixelConfig return the index into the stencil format array on G rGLCaps to a
169 // compatible stencil format, or negative if there is no compatible stencil format. 170 // compatible stencil format, or negative if there is no compatible stencil format.
170 int getCompatibleStencilIndex(GrPixelConfig config); 171 int getCompatibleStencilIndex(GrPixelConfig config);
171 172
172 173
173 // Returns whether the texture is successfully created. On success, the 174 // Returns whether the texture is successfully created. On success, the
174 // result is stored in |info|. 175 // result is stored in |info|.
175 // The texture is populated with |texels|, if it exists. 176 // The texture is populated with |texels|, if it exists.
176 // The texture parameters are cached in |initialTexParams|. 177 // The texture parameters are cached in |initialTexParams|.
177 bool createTextureImpl(const GrSurfaceDesc& desc, GrGLTextureInfo* info, 178 bool createTextureImpl(const GrSurfaceDesc& desc, GrGLTextureInfo* info,
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 bool fPLSHasBeenUsed; 596 bool fPLSHasBeenUsed;
596 597
597 float fHWMinSampleShading; 598 float fHWMinSampleShading;
598 599
599 typedef GrGpu INHERITED; 600 typedef GrGpu INHERITED;
600 friend class GrGLPathRendering; // For accessing setTextureUnit. 601 friend class GrGLPathRendering; // For accessing setTextureUnit.
601 friend class gr_instanced::GLInstancedRendering; // For accessing flushGLSta te. 602 friend class gr_instanced::GLInstancedRendering; // For accessing flushGLSta te.
602 }; 603 };
603 604
604 #endif 605 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698