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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_autogen.h

Issue 169403005: command_buffer: Implement path rendering functions for CHROMIUM_path_rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nv-pr-02-texgen
Patch Set: improve parameter validation and write up the extension .txt file Created 6 years, 8 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: gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
index 3a242d83a4795d77452eb742cf3f149dc05d7b90..650c86c4120449fc737bb3c8c35d686164cdc6d8 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
@@ -3507,6 +3507,39 @@ error::Error GLES2DecoderImpl::HandleMatrixLoadIdentityCHROMIUM(
return error::kNoError;
}
+error::Error GLES2DecoderImpl::HandleDeletePathsCHROMIUM(
+ uint32 immediate_data_size,
+ const gles2::cmds::DeletePathsCHROMIUM& c) {
+ GLuint path = c.path;
+ GLsizei range = static_cast<GLsizei>(c.range);
+ if (range < 0) {
+ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glDeletePathsCHROMIUM", "range < 0");
+ return error::kNoError;
+ }
+ DeletePathsCHROMIUMHelper(path, range);
+ return error::kNoError;
+}
+
+error::Error GLES2DecoderImpl::HandlePathStencilFuncCHROMIUM(
+ uint32 immediate_data_size,
+ const gles2::cmds::PathStencilFuncCHROMIUM& c) {
+ GLenum func = static_cast<GLenum>(c.func);
+ GLint ref = static_cast<GLint>(c.ref);
+ GLuint mask = static_cast<GLuint>(c.mask);
+ if (!validators_->cmp_function.IsValid(func)) {
+ LOCAL_SET_GL_ERROR_INVALID_ENUM("glPathStencilFuncCHROMIUM", func, "func");
+ return error::kNoError;
+ }
+ if (state_.stencil_path_func != func || state_.stencil_path_ref != ref ||
+ state_.stencil_path_mask != mask) {
+ state_.stencil_path_func = func;
+ state_.stencil_path_ref = ref;
+ state_.stencil_path_mask = mask;
+ glPathStencilFuncNV(func, ref, mask);
+ }
+ return error::kNoError;
+}
+
bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) {
switch (cap) {
case GL_BLEND:

Powered by Google App Engine
This is Rietveld 408576698