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

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

Issue 1897203002: Implement instanced rendering for simple shapes (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_requireHWAA
Patch Set: comments Created 4 years, 7 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 GrGLStandard glStandard() const { return fGLContext->standard(); } 47 GrGLStandard glStandard() const { return fGLContext->standard(); }
48 GrGLVersion glVersion() const { return fGLContext->version(); } 48 GrGLVersion glVersion() const { return fGLContext->version(); }
49 GrGLSLGeneration glslGeneration() const { return fGLContext->glslGeneration( ); } 49 GrGLSLGeneration glslGeneration() const { return fGLContext->glslGeneration( ); }
50 const GrGLCaps& glCaps() const { return *fGLContext->caps(); } 50 const GrGLCaps& glCaps() const { return *fGLContext->caps(); }
51 51
52 GrGLPathRendering* glPathRendering() { 52 GrGLPathRendering* glPathRendering() {
53 SkASSERT(glCaps().shaderCaps()->pathRenderingSupport()); 53 SkASSERT(glCaps().shaderCaps()->pathRenderingSupport());
54 return static_cast<GrGLPathRendering*>(pathRendering()); 54 return static_cast<GrGLPathRendering*>(pathRendering());
55 } 55 }
56 56
57 GrInstancedRendering* createInstancedRenderingIfSupported() override;
58
57 void discard(GrRenderTarget*) override; 59 void discard(GrRenderTarget*) override;
58 60
59 // Used by GrGLProgram to configure OpenGL state. 61 // Used by GrGLProgram to configure OpenGL state.
60 void bindTexture(int unitIdx, const GrTextureParams& params, bool dstConfigA llowsSRGB, 62 void bindTexture(int unitIdx, const GrTextureParams& params, bool dstConfigA llowsSRGB,
61 GrGLTexture* texture); 63 GrGLTexture* texture);
62 64
63 void bindTexelBuffer(int unitIdx, intptr_t offsetInBytes, GrPixelConfig, GrG LBuffer*); 65 void bindTexelBuffer(int unitIdx, intptr_t offsetInBytes, GrPixelConfig, GrG LBuffer*);
64 66
65 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes, 67 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes,
66 GrPixelConfig readConfig, DrawPreference*, 68 GrPixelConfig readConfig, DrawPreference*,
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 SkAutoTUnref<GrGLBuffer> fArrayBuffer; 563 SkAutoTUnref<GrGLBuffer> fArrayBuffer;
562 } fPLSSetupProgram; 564 } fPLSSetupProgram;
563 565
564 bool fHWPLSEnabled; 566 bool fHWPLSEnabled;
565 bool fPLSHasBeenUsed; 567 bool fPLSHasBeenUsed;
566 568
567 float fHWMinSampleShading; 569 float fHWMinSampleShading;
568 570
569 typedef GrGpu INHERITED; 571 typedef GrGpu INHERITED;
570 friend class GrGLPathRendering; // For accessing setTextureUnit. 572 friend class GrGLPathRendering; // For accessing setTextureUnit.
573 friend class GrGLInstancedRendering; // For accessing flushGLState.
571 }; 574 };
572 575
573 #endif 576 #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