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

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

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/common/gles2_cmd_utils.cc
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 8381586482b441b32cd7fe3f1bb8cd9284840419..85571dca18a8d81f347693a594c1a3e3fb1d932a 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -546,6 +546,26 @@ size_t GLES2Util::GetGLTypeSizeForTexturesAndBuffers(uint32 type) {
}
}
+size_t GLES2Util::GetComponentCountForGLTransformType(uint32 type) {
+ switch (type) {
+ case GL_TRANSLATE_X_CHROMIUM:
+ case GL_TRANSLATE_Y_CHROMIUM:
+ return 1;
+ case GL_TRANSLATE_2D_CHROMIUM:
+ return 2;
+ case GL_TRANSLATE_3D_CHROMIUM:
+ return 3;
+ case GL_AFFINE_2D_CHROMIUM:
+ case GL_TRANSPOSE_AFFINE_2D_CHROMIUM:
+ return 6;
+ case GL_AFFINE_3D_CHROMIUM:
+ case GL_TRANSPOSE_AFFINE_3D_CHROMIUM:
+ return 12;
+ default:
+ return 0;
+ }
+}
+
uint32 GLES2Util::GLErrorToErrorBit(uint32 error) {
switch (error) {
case GL_INVALID_ENUM:

Powered by Google App Engine
This is Rietveld 408576698