| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| index e80c41b11ed34e78529496b27ef75b764dbf32bd..27cceda2a44af71568075d9a98e4bfb85dc63b57 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -56,7 +56,6 @@
|
| #include "gpu/command_buffer/service/shader_manager.h"
|
| #include "gpu/command_buffer/service/shader_translator.h"
|
| #include "gpu/command_buffer/service/texture_manager.h"
|
| -#include "gpu/command_buffer/service/valuebuffer_manager.h"
|
| #include "gpu/command_buffer/service/vertex_array_manager.h"
|
| #include "gpu/command_buffer/service/vertex_attrib_manager.h"
|
| #include "third_party/smhasher/src/City.h"
|
| @@ -635,10 +634,6 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
|
| }
|
| ImageManager* GetImageManager() override { return image_manager_.get(); }
|
|
|
| - ValuebufferManager* GetValuebufferManager() override {
|
| - return valuebuffer_manager();
|
| - }
|
| -
|
| bool HasPendingQueries() const override;
|
| void ProcessPendingQueries(bool did_finish) override;
|
|
|
| @@ -743,8 +738,6 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
|
| void DeleteFramebuffersHelper(GLsizei n, const GLuint* client_ids);
|
| bool GenRenderbuffersHelper(GLsizei n, const GLuint* client_ids);
|
| void DeleteRenderbuffersHelper(GLsizei n, const GLuint* client_ids);
|
| - bool GenValuebuffersCHROMIUMHelper(GLsizei n, const GLuint* client_ids);
|
| - void DeleteValuebuffersCHROMIUMHelper(GLsizei n, const GLuint* client_ids);
|
| bool GenQueriesEXTHelper(GLsizei n, const GLuint* client_ids);
|
| void DeleteQueriesEXTHelper(GLsizei n, const GLuint* client_ids);
|
| bool GenVertexArraysOESHelper(GLsizei n, const GLuint* client_ids);
|
| @@ -774,10 +767,6 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
|
| return group_->framebuffer_manager();
|
| }
|
|
|
| - ValuebufferManager* valuebuffer_manager() {
|
| - return group_->valuebuffer_manager();
|
| - }
|
| -
|
| ProgramManager* program_manager() {
|
| return group_->program_manager();
|
| }
|
| @@ -1026,14 +1015,6 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
|
| GLuint client_id);
|
| void DoApplyScreenSpaceAntialiasingCHROMIUM();
|
|
|
| - bool DoIsValuebufferCHROMIUM(GLuint client_id);
|
| - void DoBindValueBufferCHROMIUM(GLenum target, GLuint valuebuffer);
|
| - void DoSubscribeValueCHROMIUM(GLenum target, GLenum subscription);
|
| - void DoPopulateSubscribedValuesCHROMIUM(GLenum target);
|
| - void DoUniformValueBufferCHROMIUM(GLint location,
|
| - GLenum target,
|
| - GLenum subscription);
|
| -
|
| void DoBindTexImage2DCHROMIUM(
|
| GLenum target,
|
| GLint image_id);
|
| @@ -1187,21 +1168,6 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
|
| renderbuffer_manager()->RemoveRenderbuffer(client_id);
|
| }
|
|
|
| - // Creates a valuebuffer info for the given valuebuffer.
|
| - void CreateValuebuffer(GLuint client_id) {
|
| - return valuebuffer_manager()->CreateValuebuffer(client_id);
|
| - }
|
| -
|
| - // Gets the valuebuffer info for a given valuebuffer.
|
| - Valuebuffer* GetValuebuffer(GLuint client_id) {
|
| - return valuebuffer_manager()->GetValuebuffer(client_id);
|
| - }
|
| -
|
| - // Removes the valuebuffer info for the given valuebuffer.
|
| - void RemoveValuebuffer(GLuint client_id) {
|
| - valuebuffer_manager()->RemoveValuebuffer(client_id);
|
| - }
|
| -
|
| // Gets the vertex attrib manager for the given vertex array.
|
| VertexAttribManager* GetVertexAttribManager(GLuint client_id) {
|
| VertexAttribManager* info =
|
| @@ -1322,22 +1288,6 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
|
| bool clear_uncleared_images, const char* func_name);
|
| bool CheckBoundReadFramebufferValid(const char* func_name);
|
|
|
| - // Check if the current valuebuffer exists and is valid. If not generates
|
| - // the appropriate GL error. Returns true if the current valuebuffer is in
|
| - // a usable state.
|
| - bool CheckCurrentValuebuffer(const char* function_name);
|
| -
|
| - // Check if the current valuebuffer exists and is valiud and that the
|
| - // value buffer is actually subscribed to the given subscription
|
| - bool CheckCurrentValuebufferForSubscription(GLenum subscription,
|
| - const char* function_name);
|
| -
|
| - // Check if the location can be used for the given subscription target. If not
|
| - // generates the appropriate GL error. Returns true if the location is usable
|
| - bool CheckSubscriptionTarget(GLint location,
|
| - GLenum subscription,
|
| - const char* function_name);
|
| -
|
| // Checks if the current program exists and is valid. If not generates the
|
| // appropriate GL error. Returns true if the current program is in a usable
|
| // state.
|
| @@ -3083,7 +3033,6 @@ bool GLES2DecoderImpl::Initialize(const scoped_refptr<gfx::GLSurface>& surface,
|
| DoBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
| DoBindFramebuffer(GL_FRAMEBUFFER, 0);
|
| DoBindRenderbuffer(GL_RENDERBUFFER, 0);
|
| - DoBindValueBufferCHROMIUM(GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM, 0);
|
|
|
| bool call_gl_clear = !surfaceless_;
|
| #if defined(OS_ANDROID)
|
| @@ -3485,19 +3434,6 @@ bool GLES2DecoderImpl::GenRenderbuffersHelper(
|
| return true;
|
| }
|
|
|
| -bool GLES2DecoderImpl::GenValuebuffersCHROMIUMHelper(GLsizei n,
|
| - const GLuint* client_ids) {
|
| - for (GLsizei ii = 0; ii < n; ++ii) {
|
| - if (GetValuebuffer(client_ids[ii])) {
|
| - return false;
|
| - }
|
| - }
|
| - for (GLsizei ii = 0; ii < n; ++ii) {
|
| - CreateValuebuffer(client_ids[ii]);
|
| - }
|
| - return true;
|
| -}
|
| -
|
| bool GLES2DecoderImpl::GenTexturesHelper(GLsizei n, const GLuint* client_ids) {
|
| for (GLsizei ii = 0; ii < n; ++ii) {
|
| if (GetTexture(client_ids[ii])) {
|
| @@ -3640,20 +3576,6 @@ void GLES2DecoderImpl::DeleteRenderbuffersHelper(
|
| }
|
| }
|
|
|
| -void GLES2DecoderImpl::DeleteValuebuffersCHROMIUMHelper(
|
| - GLsizei n,
|
| - const GLuint* client_ids) {
|
| - for (GLsizei ii = 0; ii < n; ++ii) {
|
| - Valuebuffer* valuebuffer = GetValuebuffer(client_ids[ii]);
|
| - if (valuebuffer) {
|
| - if (state_.bound_valuebuffer.get() == valuebuffer) {
|
| - state_.bound_valuebuffer = NULL;
|
| - }
|
| - RemoveValuebuffer(client_ids[ii]);
|
| - }
|
| - }
|
| -}
|
| -
|
| void GLES2DecoderImpl::DeleteTexturesHelper(
|
| GLsizei n, const GLuint* client_ids) {
|
| bool supports_separate_framebuffer_binds =
|
| @@ -4126,7 +4048,6 @@ void GLES2DecoderImpl::Destroy(bool have_context) {
|
| framebuffer_state_.bound_read_framebuffer = NULL;
|
| framebuffer_state_.bound_draw_framebuffer = NULL;
|
| state_.bound_renderbuffer = NULL;
|
| - state_.bound_valuebuffer = NULL;
|
|
|
| if (offscreen_saved_color_texture_info_.get()) {
|
| DCHECK(offscreen_target_color_texture_);
|
| @@ -7249,55 +7170,6 @@ void GLES2DecoderImpl::DoTexParameteriv(
|
| "glTexParameteriv", GetErrorState(), texture, pname, *params);
|
| }
|
|
|
| -bool GLES2DecoderImpl::CheckCurrentValuebuffer(const char* function_name) {
|
| - if (!state_.bound_valuebuffer.get()) {
|
| - // There is no valuebuffer bound
|
| - LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name,
|
| - "no valuebuffer in use");
|
| - return false;
|
| - }
|
| - return true;
|
| -}
|
| -
|
| -bool GLES2DecoderImpl::CheckCurrentValuebufferForSubscription(
|
| - GLenum subscription,
|
| - const char* function_name) {
|
| - if (!CheckCurrentValuebuffer(function_name)) {
|
| - return false;
|
| - }
|
| - if (!state_.bound_valuebuffer.get()->IsSubscribed(subscription)) {
|
| - // The valuebuffer is not subscribed to the target
|
| - LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name,
|
| - "valuebuffer is not subscribed");
|
| - return false;
|
| - }
|
| - return true;
|
| -}
|
| -
|
| -bool GLES2DecoderImpl::CheckSubscriptionTarget(GLint location,
|
| - GLenum subscription,
|
| - const char* function_name) {
|
| - if (!CheckCurrentProgramForUniform(location, function_name)) {
|
| - return false;
|
| - }
|
| - GLint real_location = -1;
|
| - GLint array_index = -1;
|
| - const Program::UniformInfo* info =
|
| - state_.current_program->GetUniformInfoByFakeLocation(
|
| - location, &real_location, &array_index);
|
| - if (!info) {
|
| - LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, "unknown location");
|
| - return false;
|
| - }
|
| - if ((ValuebufferManager::ApiTypeForSubscriptionTarget(subscription) &
|
| - info->accepts_api_type) == 0) {
|
| - LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name,
|
| - "wrong type for subscription");
|
| - return false;
|
| - }
|
| - return true;
|
| -}
|
| -
|
| bool GLES2DecoderImpl::CheckCurrentProgram(const char* function_name) {
|
| if (!state_.current_program.get()) {
|
| // The program does not exist.
|
| @@ -14795,73 +14667,6 @@ void GLES2DecoderImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() {
|
| glApplyFramebufferAttachmentCMAAINTEL();
|
| }
|
|
|
| -bool GLES2DecoderImpl::DoIsValuebufferCHROMIUM(GLuint client_id) {
|
| - const Valuebuffer* valuebuffer = GetValuebuffer(client_id);
|
| - return valuebuffer && valuebuffer->IsValid();
|
| -}
|
| -
|
| -void GLES2DecoderImpl::DoBindValueBufferCHROMIUM(GLenum target,
|
| - GLuint client_id) {
|
| - Valuebuffer* valuebuffer = NULL;
|
| - if (client_id != 0) {
|
| - valuebuffer = GetValuebuffer(client_id);
|
| - if (!valuebuffer) {
|
| - if (!group_->bind_generates_resource()) {
|
| - LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glBindValuebufferCHROMIUM",
|
| - "id not generated by glBindValuebufferCHROMIUM");
|
| - return;
|
| - }
|
| -
|
| - // It's a new id so make a valuebuffer for it.
|
| - CreateValuebuffer(client_id);
|
| - valuebuffer = GetValuebuffer(client_id);
|
| - }
|
| - valuebuffer->MarkAsValid();
|
| - }
|
| - state_.bound_valuebuffer = valuebuffer;
|
| -}
|
| -
|
| -void GLES2DecoderImpl::DoSubscribeValueCHROMIUM(GLenum target,
|
| - GLenum subscription) {
|
| - if (!CheckCurrentValuebuffer("glSubscribeValueCHROMIUM")) {
|
| - return;
|
| - }
|
| - state_.bound_valuebuffer.get()->AddSubscription(subscription);
|
| -}
|
| -
|
| -void GLES2DecoderImpl::DoPopulateSubscribedValuesCHROMIUM(GLenum target) {
|
| - if (!CheckCurrentValuebuffer("glPopulateSubscribedValuesCHROMIUM")) {
|
| - return;
|
| - }
|
| - valuebuffer_manager()->UpdateValuebufferState(state_.bound_valuebuffer.get());
|
| -}
|
| -
|
| -void GLES2DecoderImpl::DoUniformValueBufferCHROMIUM(GLint location,
|
| - GLenum target,
|
| - GLenum subscription) {
|
| - if (!CheckCurrentValuebufferForSubscription(
|
| - subscription, "glPopulateSubscribedValuesCHROMIUM")) {
|
| - return;
|
| - }
|
| - if (!CheckSubscriptionTarget(location, subscription,
|
| - "glPopulateSubscribedValuesCHROMIUM")) {
|
| - return;
|
| - }
|
| - const ValueState* state =
|
| - state_.bound_valuebuffer.get()->GetState(subscription);
|
| - if (state) {
|
| - switch (subscription) {
|
| - case GL_MOUSE_POSITION_CHROMIUM:
|
| - DoUniform2iv(location, 1, state->int_value);
|
| - break;
|
| - default:
|
| - NOTREACHED() << "Unhandled uniform subscription target "
|
| - << subscription;
|
| - break;
|
| - }
|
| - }
|
| -}
|
| -
|
| void GLES2DecoderImpl::DoInsertEventMarkerEXT(
|
| GLsizei length, const GLchar* marker) {
|
| if (!marker) {
|
|
|