Chromium Code Reviews| 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 37d10447e3d38ef9d2ce492caf7d2aeb98ef8e2d..af094a3b1d075db124aa615947f47b1c447e6cd5 100644 |
| --- a/gpu/command_buffer/common/gles2_cmd_utils.cc |
| +++ b/gpu/command_buffer/common/gles2_cmd_utils.cc |
| @@ -784,6 +784,10 @@ bool GLES2Util::ParseUniformName( |
| namespace { |
| +// WebGraphicsContext3DCommandBufferImpl configuration attributes. Those in |
| +// the 16-bit range are the same as used by EGL. Those outside the 16-bit range |
| +// are unique to Chromium. Attributes are matched using a closest fit algorithm. |
| + |
| // From <EGL/egl.h>. |
| const int32 kAlphaSize = 0x3021; // EGL_ALPHA_SIZE |
| const int32 kBlueSize = 0x3022; // EGL_BLUE_SIZE |
| @@ -799,7 +803,6 @@ const int32 kBufferPreserved = 0x3094; // EGL_BUFFER_PRESERVED |
| const int32 kBufferDestroyed = 0x3095; // EGL_BUFFER_DESTROYED |
| // Chromium only. |
| -const int32 kShareResources = 0x10000; |
|
Zhenyao Mo
2014/08/09 00:42:25
nit: move the below three values one up. It's wei
|
| const int32 kBindGeneratesResource = 0x10001; |
| const int32 kFailIfMajorPerfCaveat = 0x10002; |
| const int32 kLoseContextWhenOutOfMemory = 0x10003; |
| @@ -816,12 +819,11 @@ ContextCreationAttribHelper::ContextCreationAttribHelper() |
| samples_(-1), |
| sample_buffers_(-1), |
| buffer_preserved_(true), |
| - share_resources_(false), |
| bind_generates_resource_(true), |
| fail_if_major_perf_caveat_(false), |
| lose_context_when_out_of_memory_(false) {} |
| -void ContextCreationAttribHelper::Serialize(std::vector<int32>* attribs) { |
| +void ContextCreationAttribHelper::Serialize(std::vector<int32>* attribs) const { |
| if (alpha_size_ != -1) { |
| attribs->push_back(kAlphaSize); |
| attribs->push_back(alpha_size_); |
| @@ -856,8 +858,6 @@ void ContextCreationAttribHelper::Serialize(std::vector<int32>* attribs) { |
| } |
| attribs->push_back(kSwapBehavior); |
| attribs->push_back(buffer_preserved_ ? kBufferPreserved : kBufferDestroyed); |
| - attribs->push_back(kShareResources); |
| - attribs->push_back(share_resources_ ? 1 : 0); |
| attribs->push_back(kBindGeneratesResource); |
| attribs->push_back(bind_generates_resource_ ? 1 : 0); |
| attribs->push_back(kFailIfMajorPerfCaveat); |
| @@ -909,9 +909,6 @@ bool ContextCreationAttribHelper::Parse(const std::vector<int32>& attribs) { |
| case kSwapBehavior: |
| buffer_preserved_ = value == kBufferPreserved; |
| break; |
| - case kShareResources: |
| - share_resources_ = value != 0; |
| - break; |
| case kBindGeneratesResource: |
| bind_generates_resource_ = value != 0; |
| break; |