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

Side by Side Diff: src/gpu/gl/GrGLInstancedRendering.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/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLInstancedRendering.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrGLInstancedRendering_DEFINED
9 #define GrGLInstancedRendering_DEFINED
10
11 #include "GrInstancedRendering.h"
12 #include "gl/GrGLFunctions.h"
13
14 class GrGLGpu;
15
16 class GrGLInstancedRendering final : public GrInstancedRendering {
17 public:
18 static GrGLInstancedRendering* CreateIfSupported(GrGLGpu*);
19 ~GrGLInstancedRendering() override;
20
21 private:
22 GrGLInstancedRendering(GrGLGpu*, uint32_t supportedAAModes);
23
24 GrGLGpu* glGpu() const;
25
26 Batch* constructBatch(void* storage, int instanceIdx) override;
27
28 void onBeginFlush(GrResourceProvider*) override;
29 void onDraw(const GrPipeline&, const GrInstanceProcessor&, const Batch*) ove rride;
30 void onEndFlush() override;
31 void onResetGpuResources(ResetType) override;
32
33 void flushAttribArrays();
34
35 GrGLuint fVertexArrayID;
36 uint32_t fInstanceBufferInVertexArrayID;
37 int fTotalDrawCmdCount;
38 SkAutoTUnref<GrBuffer> fDrawIndirectBuffer;
39
40 class GLBatch;
41
42 typedef GrInstancedRendering INHERITED;
43 };
44
45 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLInstancedRendering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698