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

Unified Diff: ui/compositor/compositor.cc

Issue 271843002: Remove SharedBitmapManager global in ui/compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mojo Created 6 years, 7 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 | « ui/compositor/compositor.h ('k') | ui/compositor/test/context_factories_for_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 423f2bf0acd2d9fad1e05025dcf7686b9e48f11a..788cd484c3ec71d555528ef565af79784f77d7b7 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -41,7 +41,6 @@ const double kTestRefreshRate = 200.0;
bool g_compositor_initialized = false;
base::Thread* g_compositor_thread = NULL;
-cc::SharedBitmapManager* g_shared_bitmap_manager;
ui::ContextFactory* g_context_factory = NULL;
@@ -160,12 +159,12 @@ Compositor::Compositor(gfx::AcceleratedWidget widget)
if (!!g_compositor_thread) {
host_ = cc::LayerTreeHost::CreateThreaded(
this,
- g_shared_bitmap_manager,
+ g_context_factory->GetSharedBitmapManager(),
settings,
g_compositor_thread->message_loop_proxy());
} else {
host_ = cc::LayerTreeHost::CreateSingleThreaded(
- this, this, g_shared_bitmap_manager, settings);
+ this, this, g_context_factory->GetSharedBitmapManager(), settings);
}
UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor",
base::TimeTicks::Now() - before_create);
@@ -234,11 +233,6 @@ void Compositor::Terminate() {
g_compositor_initialized = false;
}
-// static
-void Compositor::SetSharedBitmapManager(cc::SharedBitmapManager* manager) {
- g_shared_bitmap_manager = manager;
-}
-
void Compositor::ScheduleDraw() {
if (g_compositor_thread) {
host_->Composite(gfx::FrameTime::Now());
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/context_factories_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698