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

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

Issue 1806983002: Update how we send draws to gpu backend to reduce state setting. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 4 years, 9 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
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.h
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index 39d565987d025ad9a5168dcf4ba6ae3e560fede0..e365601e1fddada89ca9ba9817eaf722f13ba065 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -27,7 +27,7 @@
#include "SkTypes.h"
class GrPipeline;
-class GrNonInstancedVertices;
+class GrNonInstancedMesh;
class GrSwizzle;
#ifdef SK_DEVELOPER
@@ -95,10 +95,6 @@ public:
fHWGeometryState.notifyIndexBufferDelete(id);
}
- void buildProgramDesc(GrProgramDesc*,
- const GrPrimitiveProcessor&,
- const GrPipeline&) const override;
-
// id and type (GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER, etc.) of buffer to bind
void bindBuffer(GrGLuint id, GrGLenum type);
@@ -216,7 +212,10 @@ private:
void onResolveRenderTarget(GrRenderTarget* target) override;
- void onDraw(const DrawArgs&, const GrNonInstancedVertices&) override;
+ void onDraw(const GrPipeline&,
+ const GrPrimitiveProcessor&,
+ const GrMesh*,
+ int meshCount) override;
bool onCopySurface(GrSurface* dst,
GrSurface* src,
@@ -232,13 +231,13 @@ private:
void setTextureUnit(int unitIdx);
// Flushes state from GrPipeline to GL. Returns false if the state couldn't be set.
- bool flushGLState(const DrawArgs&);
+ bool flushGLState(const GrPipeline& pipeline, const GrPrimitiveProcessor& primProc);
// Sets up vertex attribute pointers and strides. On return indexOffsetInBytes gives the offset
// an into the index buffer. It does not account for vertices.startIndex() but rather the start
// index is relative to the returned offset.
void setupGeometry(const GrPrimitiveProcessor&,
- const GrNonInstancedVertices& vertices,
+ const GrNonInstancedMesh& mesh,
size_t* indexOffsetInBytes);
void flushBlend(const GrXferProcessor::BlendInfo& blendInfo, const GrSwizzle&);
@@ -261,7 +260,7 @@ private:
void stampRectUsingProgram(GrGLuint program, const SkRect& bounds, GrGLint posXformUniform,
GrGLuint arrayBuffer);
- void setupPixelLocalStorage(const DrawArgs& args);
+ void setupPixelLocalStorage(const GrPipeline&, const GrPrimitiveProcessor&);
static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff);
@@ -272,7 +271,7 @@ private:
void reset();
void abandon();
- GrGLProgram* refProgram(const DrawArgs&);
+ GrGLProgram* refProgram(const GrGLGpu* gpu, const GrPipeline&, const GrPrimitiveProcessor&);
private:
enum {
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698