| Index: gpu/command_buffer/client/gles2_implementation.cc
|
| diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
|
| index 1bc3f0b39f7fbddfe3ef1c9470ba0dbffd374119..4237b2f6aaf09cb7184fee05d6c5bc71481c7405 100644
|
| --- a/gpu/command_buffer/client/gles2_implementation.cc
|
| +++ b/gpu/command_buffer/client/gles2_implementation.cc
|
| @@ -16,7 +16,6 @@
|
| #include <GLES2/gl2ext.h>
|
| #include <GLES2/gl2extchromium.h>
|
| #include "gpu/command_buffer/client/buffer_tracker.h"
|
| -#include "gpu/command_buffer/client/gpu_memory_buffer.h"
|
| #include "gpu/command_buffer/client/gpu_memory_buffer_tracker.h"
|
| #include "gpu/command_buffer/client/mapped_memory.h"
|
| #include "gpu/command_buffer/client/program_info_manager.h"
|
| @@ -25,6 +24,7 @@
|
| #include "gpu/command_buffer/client/vertex_array_object_manager.h"
|
| #include "gpu/command_buffer/common/gles2_cmd_utils.h"
|
| #include "gpu/command_buffer/common/trace_event.h"
|
| +#include "ui/gfx/gpu_memory_buffer.h"
|
|
|
| #if defined(__native_client__) && !defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS)
|
| #define GLES2_SUPPORT_CLIENT_SIDE_ARRAYS
|
| @@ -86,8 +86,7 @@ GLES2Implementation::GLES2Implementation(
|
| ShareGroup* share_group,
|
| TransferBufferInterface* transfer_buffer,
|
| bool share_resources,
|
| - bool bind_generates_resource,
|
| - ImageFactory* image_factory)
|
| + bool bind_generates_resource)
|
| : helper_(helper),
|
| transfer_buffer_(transfer_buffer),
|
| angle_pack_reverse_row_order_status_(kUnknownExtensionStatus),
|
| @@ -111,8 +110,7 @@ GLES2Implementation::GLES2Implementation(
|
| debug_(false),
|
| use_count_(0),
|
| current_query_(NULL),
|
| - error_message_callback_(NULL),
|
| - image_factory_(image_factory) {
|
| + error_message_callback_(NULL) {
|
| GPU_DCHECK(helper);
|
| GPU_DCHECK(transfer_buffer);
|
|
|
| @@ -166,7 +164,7 @@ bool GLES2Implementation::Initialize(
|
|
|
| query_tracker_.reset(new QueryTracker(mapped_memory_.get()));
|
| buffer_tracker_.reset(new BufferTracker(mapped_memory_.get()));
|
| - gpu_memory_buffer_tracker_.reset(new GpuMemoryBufferTracker(image_factory_));
|
| + gpu_memory_buffer_tracker_.reset(new GpuMemoryBufferTracker(helper_));
|
|
|
| #if defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS)
|
| GetIdHandler(id_namespaces::kBuffers)->MakeIds(
|
| @@ -2092,13 +2090,10 @@ const GLubyte* GLES2Implementation::GetStringHelper(GLenum name) {
|
| case GL_EXTENSIONS:
|
| str += std::string(str.empty() ? "" : " ") +
|
| "GL_CHROMIUM_flipy "
|
| + "GL_CHROMIUM_map_image "
|
| "GL_CHROMIUM_map_sub "
|
| "GL_CHROMIUM_shallow_flush "
|
| "GL_EXT_unpack_subimage";
|
| - if (image_factory_ != NULL) {
|
| - // The first space character is intentional.
|
| - str += " GL_CHROMIUM_map_image";
|
| - }
|
| break;
|
| default:
|
| break;
|
| @@ -3705,7 +3700,8 @@ GLuint GLES2Implementation::CreateImageCHROMIUM(
|
| }
|
|
|
| void GLES2Implementation::DestroyImageCHROMIUMHelper(GLuint image_id) {
|
| - GpuMemoryBuffer* gpu_buffer = gpu_memory_buffer_tracker_->GetBuffer(image_id);
|
| + gfx::GpuMemoryBuffer* gpu_buffer = gpu_memory_buffer_tracker_->GetBuffer(
|
| + image_id);
|
| if (!gpu_buffer) {
|
| SetGLError(GL_INVALID_OPERATION, "glDestroyImageCHROMIUM", "invalid image");
|
| return;
|
| @@ -3726,7 +3722,8 @@ void GLES2Implementation::DestroyImageCHROMIUM(GLuint image_id) {
|
| }
|
|
|
| void GLES2Implementation::UnmapImageCHROMIUMHelper(GLuint image_id) {
|
| - GpuMemoryBuffer* gpu_buffer = gpu_memory_buffer_tracker_->GetBuffer(image_id);
|
| + gfx::GpuMemoryBuffer* gpu_buffer = gpu_memory_buffer_tracker_->GetBuffer(
|
| + image_id);
|
| if (!gpu_buffer) {
|
| SetGLError(GL_INVALID_OPERATION, "glUnmapImageCHROMIUM", "invalid image");
|
| return;
|
| @@ -3750,21 +3747,22 @@ void GLES2Implementation::UnmapImageCHROMIUM(GLuint image_id) {
|
|
|
| void* GLES2Implementation::MapImageCHROMIUMHelper(GLuint image_id,
|
| GLenum access) {
|
| - GpuMemoryBuffer* gpu_buffer = gpu_memory_buffer_tracker_->GetBuffer(image_id);
|
| + gfx::GpuMemoryBuffer* gpu_buffer = gpu_memory_buffer_tracker_->GetBuffer(
|
| + image_id);
|
| if (!gpu_buffer) {
|
| SetGLError(GL_INVALID_OPERATION, "glMapImageCHROMIUM", "invalid image");
|
| return NULL;
|
| }
|
| - GpuMemoryBuffer::AccessMode mode;
|
| + gfx::GpuMemoryBuffer::AccessMode mode;
|
| switch(access) {
|
| case GL_WRITE_ONLY:
|
| - mode = GpuMemoryBuffer::WRITE_ONLY;
|
| + mode = gfx::GpuMemoryBuffer::WRITE_ONLY;
|
| break;
|
| case GL_READ_ONLY:
|
| - mode = GpuMemoryBuffer::READ_ONLY;
|
| + mode = gfx::GpuMemoryBuffer::READ_ONLY;
|
| break;
|
| case GL_READ_WRITE:
|
| - mode = GpuMemoryBuffer::READ_WRITE;
|
| + mode = gfx::GpuMemoryBuffer::READ_WRITE;
|
| break;
|
| default:
|
| SetGLError(GL_INVALID_ENUM, "glMapImageCHROMIUM",
|
| @@ -3802,7 +3800,7 @@ void GLES2Implementation::GetImageParameterivCHROMIUMHelper(
|
| return;
|
| }
|
|
|
| - GpuMemoryBuffer* gpu_buffer =
|
| + gfx::GpuMemoryBuffer* gpu_buffer =
|
| gpu_memory_buffer_tracker_->GetBuffer(image_id);
|
| if (!gpu_buffer) {
|
| SetGLError(GL_INVALID_OPERATION, "glGetImageParameterivCHROMIUM",
|
|
|