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

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 2066993003: Begin instanced rendering for simple shapes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: get mixed samples and base instance paths working again Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index d19afaff2e5a39670fa9f27a817a7b38445b0f14..77fcc2ada190b9cb79245157546a2051f2715662 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -23,6 +23,7 @@
#include "glsl/GrGLSL.h"
#include "glsl/GrGLSLCaps.h"
#include "glsl/GrGLSLPLSPathRendering.h"
+#include "instanced/GLInstancedRendering.h"
#include "SkMipMap.h"
#include "SkPixmap.h"
#include "SkStrokeRec.h"
@@ -46,6 +47,8 @@
///////////////////////////////////////////////////////////////////////////////
+using gr_instanced::InstancedRendering;
+using gr_instanced::GLInstancedRendering;
static const GrGLenum gXfermodeEquation2Blend[] = {
// Basic OpenGL blend equations.
@@ -475,6 +478,10 @@ void GrGLGpu::disconnect(DisconnectType type) {
///////////////////////////////////////////////////////////////////////////////
+InstancedRendering* GrGLGpu::createInstancedRenderingIfSupported() {
+ return GLInstancedRendering::CreateIfSupported(this);
+}
+
void GrGLGpu::onResetContext(uint32_t resetBits) {
// we don't use the zb at all
if (resetBits & kMisc_GrGLBackendState) {

Powered by Google App Engine
This is Rietveld 408576698