Revert "Revert "Reland "Add ability to specify different GP textures for each mesh in a draw."""
This reverts commit cd7907b57d7624c9bb60cd914d175ed72d9b1365.
Readds optimization to draw single texture quads using GrPrimitiveType::kTriangles, non-indexed.
Removes disable on NVIDIA/VK as bounds issue was fixed here:
https://skia.googlesource.com/skia/+/c525d4f7101715d728fca1b7fd7f170115994646
Change-Id: Icbea3de0382c68318db8ecffb2244bc4c5fe84ad
Reviewed-on: https://skia-review.googlesource.com/155500
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index ca9253c..1a2ef20 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -112,13 +112,17 @@
/**
* This function uploads uniforms, calls each GrGLSL*Processor's setData. It binds all fragment
- * processor textures. Primitive process textures are also bound here but are passed separately.
+ * processor textures. Primitive process textures can be bound using this function or by
+ * calling updatePrimitiveProcessorTextureBindings.
*
* It is the caller's responsibility to ensure the program is bound before calling.
*/
void updateUniformsAndTextureBindings(const GrPrimitiveProcessor&, const GrPipeline&,
const GrTextureProxy* const primitiveProcessorTextures[]);
+ void updatePrimitiveProcessorTextureBindings(const GrPrimitiveProcessor&,
+ const GrTextureProxy* const[]);
+
int vertexStride() const { return fVertexStride; }
int instanceStride() const { return fInstanceStride; }