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

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

Issue 169603002: Add initial support for NV_path_rendering extension to gpu command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment Created 6 years, 4 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 b35899cfbc2797dc67edbabbff8241e3d1e704a0..cb55cf3e0389a41a00360f2f4f259bbaa8f03142 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
@@ -2855,6 +2855,58 @@ error::Error GLES2DecoderImpl::HandleDrawBuffersEXTImmediate(
return error::kNoError;
}
+error::Error GLES2DecoderImpl::HandleMatrixLoadfCHROMIUMImmediate(
+ uint32_t immediate_data_size,
+ const gles2::cmds::MatrixLoadfCHROMIUMImmediate& c) {
+ if (!features().chromium_path_rendering) {
+ LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
+ "glMatrixLoadfCHROMIUM",
+ "function not available");
+ return error::kNoError;
+ }
+
+ GLenum matrixMode = static_cast<GLenum>(c.matrixMode);
+ uint32_t data_size;
+ if (!ComputeDataSize(1, sizeof(GLfloat), 16, &data_size)) {
+ return error::kOutOfBounds;
+ }
+ if (data_size > immediate_data_size) {
+ return error::kOutOfBounds;
+ }
+ const GLfloat* m =
+ GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
+ if (!validators_->matrix_mode.IsValid(matrixMode)) {
+ LOCAL_SET_GL_ERROR_INVALID_ENUM(
+ "glMatrixLoadfCHROMIUM", matrixMode, "matrixMode");
+ return error::kNoError;
+ }
+ if (m == NULL) {
+ return error::kOutOfBounds;
+ }
+ DoMatrixLoadfCHROMIUM(matrixMode, m);
+ return error::kNoError;
+}
+
+error::Error GLES2DecoderImpl::HandleMatrixLoadIdentityCHROMIUM(
+ uint32_t immediate_data_size,
+ const gles2::cmds::MatrixLoadIdentityCHROMIUM& c) {
+ if (!features().chromium_path_rendering) {
+ LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
+ "glMatrixLoadIdentityCHROMIUM",
+ "function not available");
+ return error::kNoError;
+ }
+
+ GLenum matrixMode = static_cast<GLenum>(c.matrixMode);
+ if (!validators_->matrix_mode.IsValid(matrixMode)) {
+ LOCAL_SET_GL_ERROR_INVALID_ENUM(
+ "glMatrixLoadIdentityCHROMIUM", matrixMode, "matrixMode");
+ return error::kNoError;
+ }
+ DoMatrixLoadIdentityCHROMIUM(matrixMode);
+ return error::kNoError;
+}
+
bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) {
switch (cap) {
case GL_BLEND:
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698