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

Unified Diff: gpu/ipc/service/gpu_channel_manager.cc

Issue 1845563005: Refactor content/common/gpu into gpu/ipc/service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop ref to deleted content_tests_gypi_values.content_unittests_ozone_sources Created 4 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
« no previous file with comments | « gpu/ipc/service/gpu_channel_manager.h ('k') | gpu/ipc/service/gpu_channel_manager_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « gpu/ipc/service/gpu_channel_manager.h ('k') | gpu/ipc/service/gpu_channel_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698