| Index: gpu/ipc/service/gpu_command_buffer_stub.h
|
| diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/gpu/ipc/service/gpu_command_buffer_stub.h
|
| similarity index 78%
|
| rename from content/common/gpu/gpu_command_buffer_stub.h
|
| rename to gpu/ipc/service/gpu_command_buffer_stub.h
|
| index 58d32c358885a302d35db74b9e3c2343314e66fe..32175b2b7d610e7e5a348a754a48bc868395c22f 100644
|
| --- a/content/common/gpu/gpu_command_buffer_stub.h
|
| +++ b/gpu/ipc/service/gpu_command_buffer_stub.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
|
| -#define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
|
| +#ifndef GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_
|
| +#define GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_
|
|
|
| #include <stddef.h>
|
| #include <stdint.h>
|
| @@ -16,15 +16,15 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/observer_list.h"
|
| #include "base/time/time.h"
|
| -#include "content/common/content_export.h"
|
| -#include "content/common/gpu/gpu_memory_manager.h"
|
| #include "gpu/command_buffer/common/command_buffer_id.h"
|
| #include "gpu/command_buffer/common/constants.h"
|
| #include "gpu/command_buffer/common/gpu_memory_allocation.h"
|
| #include "gpu/command_buffer/service/command_buffer_service.h"
|
| #include "gpu/command_buffer/service/command_executor.h"
|
| #include "gpu/command_buffer/service/context_group.h"
|
| +#include "gpu/gpu_export.h"
|
| #include "gpu/ipc/common/surface_handle.h"
|
| +#include "gpu/ipc/service/gpu_memory_manager.h"
|
| #include "ipc/ipc_listener.h"
|
| #include "ipc/ipc_sender.h"
|
| #include "ui/events/latency_info.h"
|
| @@ -49,13 +49,13 @@ class SubscriptionRefSet;
|
|
|
| struct GpuCommandBufferMsg_CreateImage_Params;
|
|
|
| -namespace content {
|
| +namespace gpu {
|
|
|
| class GpuChannel;
|
| class GpuWatchdog;
|
| struct WaitForCommandState;
|
|
|
| -class GpuCommandBufferStub
|
| +class GPU_EXPORT GpuCommandBufferStub
|
| : public IPC::Listener,
|
| public IPC::Sender,
|
| public base::SupportsWeakPtr<GpuCommandBufferStub> {
|
| @@ -74,16 +74,16 @@ class GpuCommandBufferStub
|
|
|
| GpuCommandBufferStub(
|
| GpuChannel* channel,
|
| - gpu::SyncPointManager* sync_point_manager,
|
| + SyncPointManager* sync_point_manager,
|
| base::SingleThreadTaskRunner* task_runner,
|
| GpuCommandBufferStub* share_group,
|
| - gpu::SurfaceHandle surface_handle,
|
| - gpu::gles2::MailboxManager* mailbox_manager,
|
| - gpu::PreemptionFlag* preempt_by_flag,
|
| - gpu::gles2::SubscriptionRefSet* subscription_ref_set,
|
| - gpu::ValueStateMap* pending_valuebuffer_state,
|
| + SurfaceHandle surface_handle,
|
| + gles2::MailboxManager* mailbox_manager,
|
| + PreemptionFlag* preempt_by_flag,
|
| + gles2::SubscriptionRefSet* subscription_ref_set,
|
| + ValueStateMap* pending_valuebuffer_state,
|
| const gfx::Size& size,
|
| - const gpu::gles2::DisallowedFeatures& disallowed_features,
|
| + const gles2::DisallowedFeatures& disallowed_features,
|
| const std::vector<int32_t>& attribs,
|
| gfx::GpuPreference gpu_preference,
|
| int32_t stream_id,
|
| @@ -99,7 +99,7 @@ class GpuCommandBufferStub
|
| // IPC::Sender implementation:
|
| bool Send(IPC::Message* msg) override;
|
|
|
| - gpu::gles2::MemoryTracker* GetMemoryTracker() const;
|
| + gles2::MemoryTracker* GetMemoryTracker() const;
|
|
|
| // Whether this command buffer can currently handle IPC messages.
|
| bool IsScheduled();
|
| @@ -107,12 +107,12 @@ class GpuCommandBufferStub
|
| // Whether there are commands in the buffer that haven't been processed.
|
| bool HasUnprocessedCommands();
|
|
|
| - gpu::gles2::GLES2Decoder* decoder() const { return decoder_.get(); }
|
| - gpu::CommandExecutor* scheduler() const { return executor_.get(); }
|
| + gles2::GLES2Decoder* decoder() const { return decoder_.get(); }
|
| + CommandExecutor* scheduler() const { return executor_.get(); }
|
| GpuChannel* channel() const { return channel_; }
|
|
|
| // Unique command buffer ID for this command buffer stub.
|
| - gpu::CommandBufferId command_buffer_id() const { return command_buffer_id_; }
|
| + CommandBufferId command_buffer_id() const { return command_buffer_id_; }
|
|
|
| // Identifies the various GpuCommandBufferStubs in the GPU process belonging
|
| // to the same renderer process.
|
| @@ -139,7 +139,7 @@ class GpuCommandBufferStub
|
|
|
| void MarkContextLost();
|
|
|
| - const gpu::gles2::FeatureInfo* GetFeatureInfo() const;
|
| + const gles2::FeatureInfo* GetFeatureInfo() const;
|
|
|
| void SendSwapBuffersCompleted(
|
| const std::vector<ui::LatencyInfo>& latency_info,
|
| @@ -163,7 +163,7 @@ class GpuCommandBufferStub
|
| void OnInitialize(base::SharedMemoryHandle shared_state_shm,
|
| IPC::Message* reply_message);
|
| void OnSetGetBuffer(int32_t shm_id, IPC::Message* reply_message);
|
| - void OnProduceFrontBuffer(const gpu::Mailbox& mailbox);
|
| + void OnProduceFrontBuffer(const Mailbox& mailbox);
|
| void OnGetState(IPC::Message* reply_message);
|
| void OnWaitForTokenInRange(int32_t start,
|
| int32_t end,
|
| @@ -182,16 +182,16 @@ class GpuCommandBufferStub
|
|
|
| void OnEnsureBackbuffer();
|
|
|
| - void OnSignalSyncToken(const gpu::SyncToken& sync_token, uint32_t id);
|
| + void OnSignalSyncToken(const SyncToken& sync_token, uint32_t id);
|
| void OnSignalAck(uint32_t id);
|
| void OnSignalQuery(uint32_t query, uint32_t id);
|
|
|
| void OnFenceSyncRelease(uint64_t release);
|
| - bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id,
|
| - gpu::CommandBufferId command_buffer_id,
|
| + bool OnWaitFenceSync(CommandBufferNamespace namespace_id,
|
| + CommandBufferId command_buffer_id,
|
| uint64_t release);
|
| - void OnWaitFenceSyncCompleted(gpu::CommandBufferNamespace namespace_id,
|
| - gpu::CommandBufferId command_buffer_id,
|
| + void OnWaitFenceSyncCompleted(CommandBufferNamespace namespace_id,
|
| + CommandBufferId command_buffer_id,
|
| uint64_t release);
|
|
|
| void OnCreateImage(const GpuCommandBufferMsg_CreateImage_Params& params);
|
| @@ -221,8 +221,8 @@ class GpuCommandBufferStub
|
|
|
| bool CheckContextLost();
|
| void CheckCompleteWaits();
|
| - void PullTextureUpdates(gpu::CommandBufferNamespace namespace_id,
|
| - gpu::CommandBufferId command_buffer_id,
|
| + void PullTextureUpdates(CommandBufferNamespace namespace_id,
|
| + CommandBufferId command_buffer_id,
|
| uint32_t release);
|
|
|
| // The lifetime of objects of this class is managed by a GpuChannel. The
|
| @@ -231,30 +231,30 @@ class GpuCommandBufferStub
|
| GpuChannel* const channel_;
|
|
|
| // Outlives the stub.
|
| - gpu::SyncPointManager* const sync_point_manager_;
|
| + SyncPointManager* const sync_point_manager_;
|
|
|
| // Task runner for main thread.
|
| scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
|
|
|
| // The group of contexts that share namespaces with this context.
|
| - scoped_refptr<gpu::gles2::ContextGroup> context_group_;
|
| + scoped_refptr<gles2::ContextGroup> context_group_;
|
|
|
| bool initialized_;
|
| - const gpu::SurfaceHandle surface_handle_;
|
| + const SurfaceHandle surface_handle_;
|
| gfx::Size initial_size_;
|
| - gpu::gles2::DisallowedFeatures disallowed_features_;
|
| + gles2::DisallowedFeatures disallowed_features_;
|
| std::vector<int32_t> requested_attribs_;
|
| gfx::GpuPreference gpu_preference_;
|
| bool use_virtualized_gl_context_;
|
| - const gpu::CommandBufferId command_buffer_id_;
|
| + const CommandBufferId command_buffer_id_;
|
| const int32_t stream_id_;
|
| const int32_t route_id_;
|
| uint32_t last_flush_count_;
|
|
|
| - scoped_ptr<gpu::CommandBufferService> command_buffer_;
|
| - scoped_ptr<gpu::gles2::GLES2Decoder> decoder_;
|
| - scoped_ptr<gpu::CommandExecutor> executor_;
|
| - scoped_ptr<gpu::SyncPointClient> sync_point_client_;
|
| + scoped_ptr<CommandBufferService> command_buffer_;
|
| + scoped_ptr<gles2::GLES2Decoder> decoder_;
|
| + scoped_ptr<CommandExecutor> executor_;
|
| + scoped_ptr<SyncPointClient> sync_point_client_;
|
| scoped_refptr<gfx::GLSurface> surface_;
|
| gfx::GLSurface::Format surface_format_;
|
|
|
| @@ -268,7 +268,7 @@ class GpuCommandBufferStub
|
| uint32_t previous_processed_num_;
|
| base::TimeTicks last_idle_time_;
|
|
|
| - scoped_refptr<gpu::PreemptionFlag> preemption_flag_;
|
| + scoped_refptr<PreemptionFlag> preemption_flag_;
|
|
|
| LatencyInfoCallback latency_info_callback_;
|
|
|
| @@ -281,6 +281,6 @@ class GpuCommandBufferStub
|
| DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
|
| };
|
|
|
| -} // namespace content
|
| +} // namespace gpu
|
|
|
| -#endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
|
| +#endif // GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_
|
|
|