summaryrefslogtreecommitdiffstats
path: root/mojo/gpu
diff options
context:
space:
mode:
authorkkinnunen <kkinnunen@nvidia.com>2015-10-28 01:50:00 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-28 08:50:58 +0000
commitfb3f117d605fcba79a9a6e85dad021a6d77d57cc (patch)
treecd9bf8a44cffb4c2e9ce1e51ee5ac38bff29a3d6 /mojo/gpu
parent3dc5ef2ff48fa435753e97cb431fa5360aa3355a (diff)
downloadchromium_src-fb3f117d605fcba79a9a6e85dad021a6d77d57cc.zip
chromium_src-fb3f117d605fcba79a9a6e85dad021a6d77d57cc.tar.gz
chromium_src-fb3f117d605fcba79a9a6e85dad021a6d77d57cc.tar.bz2
command_buffer: Support instanced path rendering in gpu command buffer
Implement support for instanced path rendering in gpu command buffer. Exposes following new functions through command buffer: glStencilFillPathInstancedCHROMIUM glStencilStrokePathInstancedCHROMIUM glCoverFillPathInstancedCHROMIUM glCoverStrokePathInstancedCHROMIUM glStencilThenCoverFillPathInstancedCHROMIUM glStencilThenCoverStrokePathInstancedCHROMIUM These functions are exposed as part of the CHROMIUM_path_rendering GL ES extension. Converts the NV_path_rendering functions that Skia calls to these functions, passes the calls through the command buffer and then calls the corresponding NV_path_rendering functions. BUG=344330 Review URL: https://codereview.chromium.org/477623004 Cr-Commit-Position: refs/heads/master@{#356526}
Diffstat (limited to 'mojo/gpu')
-rw-r--r--mojo/gpu/mojo_gles2_impl_autogen.cc82
-rw-r--r--mojo/gpu/mojo_gles2_impl_autogen.h53
2 files changed, 135 insertions, 0 deletions
diff --git a/mojo/gpu/mojo_gles2_impl_autogen.cc b/mojo/gpu/mojo_gles2_impl_autogen.cc
index 30767c1..9fbe344 100644
--- a/mojo/gpu/mojo_gles2_impl_autogen.cc
+++ b/mojo/gpu/mojo_gles2_impl_autogen.cc
@@ -1789,6 +1789,88 @@ void MojoGLES2Impl::StencilThenCoverStrokePathCHROMIUM(GLuint path,
MojoGLES2MakeCurrent(context_);
glStencilThenCoverStrokePathCHROMIUM(path, reference, mask, coverMode);
}
+void MojoGLES2Impl::StencilFillPathInstancedCHROMIUM(
+ GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLenum fillMode,
+ GLuint mask,
+ GLenum transformType,
+ const GLfloat* transformValues) {
+ MojoGLES2MakeCurrent(context_);
+ glStencilFillPathInstancedCHROMIUM(numPaths, pathNameType, paths, pathBase,
+ fillMode, mask, transformType,
+ transformValues);
+}
+void MojoGLES2Impl::StencilStrokePathInstancedCHROMIUM(
+ GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLint reference,
+ GLuint mask,
+ GLenum transformType,
+ const GLfloat* transformValues) {
+ MojoGLES2MakeCurrent(context_);
+ glStencilStrokePathInstancedCHROMIUM(numPaths, pathNameType, paths, pathBase,
+ reference, mask, transformType,
+ transformValues);
+}
+void MojoGLES2Impl::CoverFillPathInstancedCHROMIUM(
+ GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLenum coverMode,
+ GLenum transformType,
+ const GLfloat* transformValues) {
+ MojoGLES2MakeCurrent(context_);
+ glCoverFillPathInstancedCHROMIUM(numPaths, pathNameType, paths, pathBase,
+ coverMode, transformType, transformValues);
+}
+void MojoGLES2Impl::CoverStrokePathInstancedCHROMIUM(
+ GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLenum coverMode,
+ GLenum transformType,
+ const GLfloat* transformValues) {
+ MojoGLES2MakeCurrent(context_);
+ glCoverStrokePathInstancedCHROMIUM(numPaths, pathNameType, paths, pathBase,
+ coverMode, transformType, transformValues);
+}
+void MojoGLES2Impl::StencilThenCoverFillPathInstancedCHROMIUM(
+ GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLenum fillMode,
+ GLuint mask,
+ GLenum coverMode,
+ GLenum transformType,
+ const GLfloat* transformValues) {
+ MojoGLES2MakeCurrent(context_);
+ glStencilThenCoverFillPathInstancedCHROMIUM(
+ numPaths, pathNameType, paths, pathBase, fillMode, mask, coverMode,
+ transformType, transformValues);
+}
+void MojoGLES2Impl::StencilThenCoverStrokePathInstancedCHROMIUM(
+ GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLint reference,
+ GLuint mask,
+ GLenum coverMode,
+ GLenum transformType,
+ const GLfloat* transformValues) {
+ MojoGLES2MakeCurrent(context_);
+ glStencilThenCoverStrokePathInstancedCHROMIUM(
+ numPaths, pathNameType, paths, pathBase, reference, mask, coverMode,
+ transformType, transformValues);
+}
GLenum MojoGLES2Impl::GetGraphicsResetStatusKHR() {
MojoGLES2MakeCurrent(context_);
return glGetGraphicsResetStatusKHR();
diff --git a/mojo/gpu/mojo_gles2_impl_autogen.h b/mojo/gpu/mojo_gles2_impl_autogen.h
index 457054a..184766b 100644
--- a/mojo/gpu/mojo_gles2_impl_autogen.h
+++ b/mojo/gpu/mojo_gles2_impl_autogen.h
@@ -817,6 +817,59 @@ class MojoGLES2Impl : public gpu::gles2::GLES2Interface {
GLint reference,
GLuint mask,
GLenum coverMode) override;
+ void StencilFillPathInstancedCHROMIUM(
+ GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLenum fillMode,
+ GLuint mask,
+ GLenum transformType,
+ const GLfloat* transformValues) override;
+ void StencilStrokePathInstancedCHROMIUM(
+ GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLint reference,
+ GLuint mask,
+ GLenum transformType,
+ const GLfloat* transformValues) override;
+ void CoverFillPathInstancedCHROMIUM(GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLenum coverMode,
+ GLenum transformType,
+ const GLfloat* transformValues) override;
+ void CoverStrokePathInstancedCHROMIUM(
+ GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLenum coverMode,
+ GLenum transformType,
+ const GLfloat* transformValues) override;
+ void StencilThenCoverFillPathInstancedCHROMIUM(
+ GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLenum fillMode,
+ GLuint mask,
+ GLenum coverMode,
+ GLenum transformType,
+ const GLfloat* transformValues) override;
+ void StencilThenCoverStrokePathInstancedCHROMIUM(
+ GLsizei numPaths,
+ GLenum pathNameType,
+ const GLvoid* paths,
+ GLuint pathBase,
+ GLint reference,
+ GLuint mask,
+ GLenum coverMode,
+ GLenum transformType,
+ const GLfloat* transformValues) override;
GLenum GetGraphicsResetStatusKHR() override;
void BlendBarrierKHR() override;
void ApplyScreenSpaceAntialiasingCHROMIUM() override;