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

Unified Diff: gpu/command_buffer/service/gpu_control_service.h

Issue 235563002: gpu: Separate GpuControlService from GpuControl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 6 years, 8 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
Index: gpu/command_buffer/service/gpu_control_service.h
diff --git a/gpu/command_buffer/service/gpu_control_service.h b/gpu/command_buffer/service/gpu_control_service.h
index 74fd4d5a16a4081e349d264f8a6903251de22938..45dde878f8df6f382c3f1140416fd43b21bedc73 100644
--- a/gpu/command_buffer/service/gpu_control_service.h
+++ b/gpu/command_buffer/service/gpu_control_service.h
@@ -5,10 +5,9 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_
#define GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_
-#include <map>
-
-#include "base/memory/linked_ptr.h"
-#include "gpu/command_buffer/common/gpu_control.h"
+#include "base/callback.h"
+#include "gpu/command_buffer/common/capabilities.h"
+#include "gpu/gpu_export.h"
#include "ui/gfx/gpu_memory_buffer.h"
namespace gpu {
@@ -20,38 +19,19 @@ class MailboxManager;
class QueryManager;
}
-class GPU_EXPORT GpuControlService : public GpuControl {
+class GPU_EXPORT GpuControlService {
public:
GpuControlService(GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager,
- GpuMemoryBufferFactory* gpu_memory_buffer_factory,
gles2::MailboxManager* mailbox_manager,
- gles2::QueryManager* query_manager,
- const gpu::Capabilities& decoder_capabilities);
+ gles2::QueryManager* query_manager);
virtual ~GpuControlService();
-
- // GpuControl implementation.
- virtual gpu::Capabilities GetCapabilities() OVERRIDE;
- virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(
- size_t width,
- size_t height,
- unsigned internalformat,
- int32* id) OVERRIDE;
- virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE;
- virtual uint32 InsertSyncPoint() OVERRIDE;
- virtual void SignalSyncPoint(uint32 sync_point,
- const base::Closure& callback) OVERRIDE;
- virtual void SignalQuery(uint32 query,
- const base::Closure& callback) OVERRIDE;
- virtual void SetSurfaceVisible(bool visible) OVERRIDE;
- virtual void SendManagedMemoryStats(const ManagedMemoryStats& stats)
- OVERRIDE;
- virtual void Echo(const base::Closure& callback) OVERRIDE;
- virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE;
+ void DestroyGpuMemoryBuffer(int32 id);
reveman 2014/04/24 00:39:11 A Destroy function but no Create function is weird
boliu 2014/04/24 01:30:56 Renamed to UnregisterGpuMemoryBuffer to match Regi
no sievers 2014/04/25 19:51:48 Actually the mismatch is already there in gpu_memo
boliu 2014/04/25 20:27:15 Noticed. I was thinking maybe I should do that as
+ void SignalQuery(uint32 query, const base::Closure& callback);
// Register an existing gpu memory buffer and get an ID that can be used
// to identify it in the command buffer.
- bool RegisterGpuMemoryBuffer(int32 id,
+ void RegisterGpuMemoryBuffer(int32 id,
gfx::GpuMemoryBufferHandle buffer,
size_t width,
size_t height,
@@ -59,12 +39,8 @@ class GPU_EXPORT GpuControlService : public GpuControl {
private:
GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager_;
- GpuMemoryBufferFactory* gpu_memory_buffer_factory_;
gles2::MailboxManager* mailbox_manager_;
gles2::QueryManager* query_manager_;
- typedef std::map<int32, linked_ptr<gfx::GpuMemoryBuffer> > GpuMemoryBufferMap;
- GpuMemoryBufferMap gpu_memory_buffers_;
- gpu::Capabilities capabilities_;
DISALLOW_COPY_AND_ASSIGN(GpuControlService);
};

Powered by Google App Engine
This is Rietveld 408576698