| Index: gpu/command_buffer/client/gl_in_process_context.cc
|
| diff --git a/gpu/command_buffer/client/gl_in_process_context.cc b/gpu/command_buffer/client/gl_in_process_context.cc
|
| index cdbfc9f47c3f8828899a4f96f5011cb4f536353e..f7780473b6bbb9c53c86673f9f2b19782496d9dd 100644
|
| --- a/gpu/command_buffer/client/gl_in_process_context.cc
|
| +++ b/gpu/command_buffer/client/gl_in_process_context.cc
|
| @@ -23,8 +23,6 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "gpu/command_buffer/client/gles2_implementation.h"
|
| -#include "gpu/command_buffer/client/gpu_memory_buffer_factory.h"
|
| -#include "gpu/command_buffer/client/image_factory.h"
|
| #include "gpu/command_buffer/client/transfer_buffer.h"
|
| #include "gpu/command_buffer/common/command_buffer.h"
|
| #include "gpu/command_buffer/common/constants.h"
|
| @@ -43,11 +41,8 @@ const size_t kStartTransferBufferSize = 4 * 1024 * 1024;
|
| const size_t kMinTransferBufferSize = 1 * 256 * 1024;
|
| const size_t kMaxTransferBufferSize = 16 * 1024 * 1024;
|
|
|
| -static GpuMemoryBufferFactory* g_gpu_memory_buffer_factory = NULL;
|
| -
|
| class GLInProcessContextImpl
|
| : public GLInProcessContext,
|
| - public gles2::ImageFactory,
|
| public base::SupportsWeakPtr<GLInProcessContextImpl> {
|
| public:
|
| explicit GLInProcessContextImpl();
|
| @@ -70,12 +65,6 @@ class GLInProcessContextImpl
|
| OVERRIDE;
|
| virtual gles2::GLES2Implementation* GetImplementation() OVERRIDE;
|
|
|
| - // ImageFactory implementation:
|
| - virtual scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer(
|
| - int width, int height, GLenum internalformat,
|
| - unsigned* image_id) OVERRIDE;
|
| - virtual void DeleteGpuMemoryBuffer(unsigned image_id) OVERRIDE;
|
| -
|
| private:
|
| void Destroy();
|
| void PollQueryCallbacks();
|
| @@ -108,24 +97,6 @@ size_t SharedContextCount() {
|
| return g_all_shared_contexts.Get().size();
|
| }
|
|
|
| -scoped_ptr<gfx::GpuMemoryBuffer> GLInProcessContextImpl::CreateGpuMemoryBuffer(
|
| - int width, int height, GLenum internalformat, unsigned int* image_id) {
|
| - scoped_ptr<gfx::GpuMemoryBuffer> buffer(
|
| - g_gpu_memory_buffer_factory->CreateGpuMemoryBuffer(width,
|
| - height,
|
| - internalformat));
|
| - if (!buffer)
|
| - return scoped_ptr<gfx::GpuMemoryBuffer>();
|
| -
|
| - *image_id = command_buffer_->CreateImageForGpuMemoryBuffer(
|
| - buffer->GetHandle(), gfx::Size(width, height));
|
| - return buffer.Pass();
|
| -}
|
| -
|
| -void GLInProcessContextImpl::DeleteGpuMemoryBuffer(unsigned int image_id) {
|
| - command_buffer_->RemoveImage(image_id);
|
| -}
|
| -
|
| GLInProcessContextImpl::GLInProcessContextImpl()
|
| : share_group_id_(0), context_lost_(false) {}
|
|
|
| @@ -279,7 +250,7 @@ bool GLInProcessContextImpl::Initialize(
|
| share_group,
|
| transfer_buffer_.get(),
|
| false,
|
| - this));
|
| + command_buffer_.get()));
|
|
|
| if (share_resources) {
|
| g_all_shared_contexts.Get().insert(this);
|
| @@ -421,11 +392,4 @@ GLInProcessContext* GLInProcessContext::CreateWithSurface(
|
| return context.release();
|
| }
|
|
|
| -// static
|
| -void GLInProcessContext::SetGpuMemoryBufferFactory(
|
| - GpuMemoryBufferFactory* factory) {
|
| - DCHECK_EQ(0u, SharedContextCount());
|
| - g_gpu_memory_buffer_factory = factory;
|
| -}
|
| -
|
| } // namespace gpu
|
|
|