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

Side by Side Diff: src/gpu/instanced/GLInstancedRendering.h

Issue 2193303002: Add ES 3.0 fallback for instanced rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/instanced/GLInstancedRendering.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 2016 Google Inc. 2 * Copyright 2016 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 gr_instanced_GLInstancedRendering_DEFINED 8 #ifndef gr_instanced_GLInstancedRendering_DEFINED
9 #define gr_instanced_GLInstancedRendering_DEFINED 9 #define gr_instanced_GLInstancedRendering_DEFINED
10 10
(...skipping 25 matching lines...) Expand all
36 Batch* createBatch() override; 36 Batch* createBatch() override;
37 37
38 void onBeginFlush(GrResourceProvider*) override; 38 void onBeginFlush(GrResourceProvider*) override;
39 void onDraw(const GrPipeline&, const InstanceProcessor&, const Batch*) overr ide; 39 void onDraw(const GrPipeline&, const InstanceProcessor&, const Batch*) overr ide;
40 void onEndFlush() override; 40 void onEndFlush() override;
41 void onResetGpuResources(ResetType) override; 41 void onResetGpuResources(ResetType) override;
42 42
43 void flushInstanceAttribs(int baseInstance); 43 void flushInstanceAttribs(int baseInstance);
44 44
45 struct GLDrawCmdInfo { 45 struct GLDrawCmdInfo {
46 IndexRange fGeometry;
46 int fInstanceCount; 47 int fInstanceCount;
47 #if GR_GL_LOG_INSTANCED_BATCHES
48 IndexRange fGeometry;
49 #endif
50 }; 48 };
51 49
52 GrGLuint fVertexArrayID; 50 GrGLuint fVertexArrayID;
53 SkAutoTUnref<GrBuffer> fInstanceBuffer; 51 SkAutoTUnref<GrBuffer> fInstanceBuffer;
54 SkAutoTUnref<GrBuffer> fDrawIndirectBuffer; 52 SkAutoTUnref<GrBuffer> fDrawIndirectBuffer;
55 SkAutoSTMalloc<1024, GLDrawCmdInfo> fGLDrawCmdsInfo; 53 SkAutoSTMalloc<1024, GLDrawCmdInfo> fGLDrawCmdsInfo;
56 uint32_t fInstanceAttribsBufferUniqueId; 54 uint32_t fInstanceAttribsBufferUniqueId;
57 int fInstanceAttribsBaseInstance; 55 int fInstanceAttribsBaseInstance;
58 56
59 class GLBatch; 57 class GLBatch;
60 58
61 friend class ::GrGLCaps; // For CheckSupport. 59 friend class ::GrGLCaps; // For CheckSupport.
62 60
63 typedef InstancedRendering INHERITED; 61 typedef InstancedRendering INHERITED;
64 }; 62 };
65 63
66 } 64 }
67 65
68 #endif 66 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/instanced/GLInstancedRendering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698