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

Unified Diff: gpu/command_buffer/tests/gl_manager.h

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 years, 2 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
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_manager.h
diff --git a/gpu/command_buffer/tests/gl_manager.h b/gpu/command_buffer/tests/gl_manager.h
index a4f4c716595a535cbce581e1e5784f0f11e6e158..d76ca5b57421a7baace5109a0b3454b81493a3a8 100644
--- a/gpu/command_buffer/tests/gl_manager.h
+++ b/gpu/command_buffer/tests/gl_manager.h
@@ -10,6 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "gpu/command_buffer/client/gpu_control.h"
#include "gpu/command_buffer/service/feature_info.h"
+#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/size.h"
namespace gfx {
@@ -60,6 +61,10 @@ class GLManager : private GpuControl {
GLManager();
virtual ~GLManager();
+ static scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer(
+ const gfx::Size& size,
+ gfx::GpuMemoryBuffer::Format format);
+
void Initialize(const Options& options);
void Destroy();
@@ -91,12 +96,15 @@ class GLManager : private GpuControl {
// GpuControl implementation.
virtual Capabilities GetCapabilities() override;
- virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(size_t width,
- size_t height,
- unsigned internalformat,
- unsigned usage,
- int32* id) override;
- virtual void DestroyGpuMemoryBuffer(int32 id) override;
+ virtual int32 CreateImage(ClientBuffer buffer,
+ size_t width,
+ size_t height,
+ unsigned internalformat) override;
+ virtual void DestroyImage(int32 id) override;
+ virtual int32 CreateGpuMemoryBufferImage(size_t width,
+ size_t height,
+ unsigned internalformat,
+ unsigned usage) override;
virtual uint32 InsertSyncPoint() override;
virtual uint32 InsertFutureSyncPoint() override;
virtual void RetireSyncPoint(uint32 sync_point) override;
@@ -124,9 +132,6 @@ class GLManager : private GpuControl {
scoped_ptr<gles2::GLES2Implementation> gles2_implementation_;
bool context_lost_allowed_;
- // Client GpuControl implementation.
- base::ScopedPtrHashMap<int32, gfx::GpuMemoryBuffer> gpu_memory_buffers_;
-
// Used on Android to virtualize GL for all contexts.
static int use_count_;
static scoped_refptr<gfx::GLShareGroup>* base_share_group_;
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698