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

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

Issue 851183002: Add more ES3 commands to GPU command buffer: ClearBuffer* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: FINAL Created 5 years, 11 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
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/common/gles2_cmd_utils_autogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1d31f7040cbb235de74bc0e000b36b58d03e94c2..6a483f6f6afed11e3b477a2288e0e16b3ffcaafa 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -822,6 +822,28 @@ bool GLES2Util::ParseUniformName(
return true;
}
+size_t GLES2Util::CalcClearBufferivDataCount(int buffer) {
+ switch (buffer) {
+ case GL_COLOR:
+ return 4;
+ case GL_STENCIL:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+size_t GLES2Util::CalcClearBufferfvDataCount(int buffer) {
+ switch (buffer) {
+ case GL_COLOR:
+ return 4;
+ case GL_DEPTH:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
namespace {
// WebGraphicsContext3DCommandBufferImpl configuration attributes. Those in
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/common/gles2_cmd_utils_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698