| Index: gpu/ipc/service/gpu_channel_manager.cc
|
| diff --git a/content/common/gpu/gpu_channel_manager.cc b/gpu/ipc/service/gpu_channel_manager.cc
|
| similarity index 90%
|
| rename from content/common/gpu/gpu_channel_manager.cc
|
| rename to gpu/ipc/service/gpu_channel_manager.cc
|
| index 299fbe20ff413cfd4760fae80a07b509851f77f4..1edf84976ac6ff3ce99709188d0ccf027d8fd85f 100644
|
| --- a/content/common/gpu/gpu_channel_manager.cc
|
| +++ b/gpu/ipc/service/gpu_channel_manager.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/common/gpu/gpu_channel_manager.h"
|
| +#include "gpu/ipc/service/gpu_channel_manager.h"
|
|
|
| #include <algorithm>
|
| #include <utility>
|
| @@ -12,10 +12,6 @@
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/thread_task_runner_handle.h"
|
| #include "build/build_config.h"
|
| -#include "content/common/gpu/gpu_channel.h"
|
| -#include "content/common/gpu/gpu_channel_manager_delegate.h"
|
| -#include "content/common/gpu/gpu_memory_buffer_factory.h"
|
| -#include "content/common/gpu/gpu_memory_manager.h"
|
| #include "gpu/command_buffer/common/sync_token.h"
|
| #include "gpu/command_buffer/common/value_state.h"
|
| #include "gpu/command_buffer/service/feature_info.h"
|
| @@ -24,10 +20,14 @@
|
| #include "gpu/command_buffer/service/shader_translator_cache.h"
|
| #include "gpu/command_buffer/service/sync_point_manager.h"
|
| #include "gpu/ipc/common/gpu_messages.h"
|
| +#include "gpu/ipc/service/gpu_channel.h"
|
| +#include "gpu/ipc/service/gpu_channel_manager_delegate.h"
|
| +#include "gpu/ipc/service/gpu_memory_buffer_factory.h"
|
| +#include "gpu/ipc/service/gpu_memory_manager.h"
|
| #include "ui/gl/gl_bindings.h"
|
| #include "ui/gl/gl_share_group.h"
|
|
|
| -namespace content {
|
| +namespace gpu {
|
|
|
| namespace {
|
| #if defined(OS_ANDROID)
|
| @@ -41,13 +41,13 @@ const int kMaxKeepAliveTimeMs = 200;
|
| }
|
|
|
| GpuChannelManager::GpuChannelManager(
|
| - const gpu::GpuPreferences& gpu_preferences,
|
| + const GpuPreferences& gpu_preferences,
|
| GpuChannelManagerDelegate* delegate,
|
| GpuWatchdog* watchdog,
|
| base::SingleThreadTaskRunner* task_runner,
|
| base::SingleThreadTaskRunner* io_task_runner,
|
| base::WaitableEvent* shutdown_event,
|
| - gpu::SyncPointManager* sync_point_manager,
|
| + SyncPointManager* sync_point_manager,
|
| GpuMemoryBufferFactory* gpu_memory_buffer_factory)
|
| : task_runner_(task_runner),
|
| io_task_runner_(io_task_runner),
|
| @@ -56,7 +56,7 @@ GpuChannelManager::GpuChannelManager(
|
| watchdog_(watchdog),
|
| shutdown_event_(shutdown_event),
|
| share_group_(new gfx::GLShareGroup),
|
| - mailbox_manager_(gpu::gles2::MailboxManager::Create(gpu_preferences)),
|
| + mailbox_manager_(gles2::MailboxManager::Create(gpu_preferences)),
|
| gpu_memory_manager_(this),
|
| sync_point_manager_(sync_point_manager),
|
| sync_point_client_waiter_(
|
| @@ -66,7 +66,7 @@ GpuChannelManager::GpuChannelManager(
|
| DCHECK(task_runner);
|
| DCHECK(io_task_runner);
|
| if (gpu_preferences_.ui_prioritize_in_gpu_process)
|
| - preemption_flag_ = new gpu::PreemptionFlag;
|
| + preemption_flag_ = new PreemptionFlag;
|
| }
|
|
|
| GpuChannelManager::~GpuChannelManager() {
|
| @@ -78,32 +78,32 @@ GpuChannelManager::~GpuChannelManager() {
|
| }
|
| }
|
|
|
| -gpu::gles2::ProgramCache* GpuChannelManager::program_cache() {
|
| +gles2::ProgramCache* GpuChannelManager::program_cache() {
|
| if (!program_cache_.get() &&
|
| (gfx::g_driver_gl.ext.b_GL_ARB_get_program_binary ||
|
| gfx::g_driver_gl.ext.b_GL_OES_get_program_binary) &&
|
| !gpu_preferences_.disable_gpu_program_cache) {
|
| - program_cache_.reset(new gpu::gles2::MemoryProgramCache(
|
| + program_cache_.reset(new gles2::MemoryProgramCache(
|
| gpu_preferences_.gpu_program_cache_size,
|
| gpu_preferences_.disable_gpu_shader_disk_cache));
|
| }
|
| return program_cache_.get();
|
| }
|
|
|
| -gpu::gles2::ShaderTranslatorCache*
|
| +gles2::ShaderTranslatorCache*
|
| GpuChannelManager::shader_translator_cache() {
|
| if (!shader_translator_cache_.get()) {
|
| shader_translator_cache_ =
|
| - new gpu::gles2::ShaderTranslatorCache(gpu_preferences_);
|
| + new gles2::ShaderTranslatorCache(gpu_preferences_);
|
| }
|
| return shader_translator_cache_.get();
|
| }
|
|
|
| -gpu::gles2::FramebufferCompletenessCache*
|
| +gles2::FramebufferCompletenessCache*
|
| GpuChannelManager::framebuffer_completeness_cache() {
|
| if (!framebuffer_completeness_cache_.get())
|
| framebuffer_completeness_cache_ =
|
| - new gpu::gles2::FramebufferCompletenessCache;
|
| + new gles2::FramebufferCompletenessCache;
|
| return framebuffer_completeness_cache_.get();
|
| }
|
|
|
| @@ -187,9 +187,9 @@ void GpuChannelManager::InternalDestroyGpuMemoryBufferOnIO(
|
| void GpuChannelManager::DestroyGpuMemoryBuffer(
|
| gfx::GpuMemoryBufferId id,
|
| int client_id,
|
| - const gpu::SyncToken& sync_token) {
|
| + const SyncToken& sync_token) {
|
| if (sync_token.HasData()) {
|
| - scoped_refptr<gpu::SyncPointClientState> release_state =
|
| + scoped_refptr<SyncPointClientState> release_state =
|
| sync_point_manager()->GetSyncPointClientState(
|
| sync_token.namespace_id(), sync_token.command_buffer_id());
|
| if (release_state) {
|
| @@ -207,7 +207,7 @@ void GpuChannelManager::DestroyGpuMemoryBuffer(
|
|
|
| void GpuChannelManager::UpdateValueState(int client_id,
|
| unsigned int target,
|
| - const gpu::ValueState& state) {
|
| + const ValueState& state) {
|
| // Only pass updated state to the channel corresponding to the
|
| // render_widget_host where the event originated.
|
| auto it = gpu_channels_.find(client_id);
|
| @@ -306,4 +306,4 @@ void GpuChannelManager::DoWakeUpGpu() {
|
| }
|
| #endif
|
|
|
| -} // namespace content
|
| +} // namespace gpu
|
|
|