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

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

Issue 2029803002: Improve CopyTex{Sub}Image2D format validation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: with fix Created 4 years, 7 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.h
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.h b/gpu/command_buffer/common/gles2_cmd_utils.h
index 267c0413af312bba055ab9657b062c71cbb2dd49..c9589b67b1cb167c0850a6935e0944714e4b27dd 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils.h
@@ -221,6 +221,10 @@ class GLES2_UTILS_EXPORT GLES2Util {
static bool IsIntegerFormat(uint32_t internal_format);
static bool IsFloatFormat(uint32_t internal_format);
+ static bool IsSizedColorFormat(uint32_t internal_format);
+ static void GetColorFormatComponentSizes(
+ uint32_t internal_format, uint32_t type, int* r, int* g, int* b, int* a);
+
// Computes the data size for certain gl commands like glUniform.
static bool ComputeDataSize(uint32_t count,
size_t size,

Powered by Google App Engine
This is Rietveld 408576698