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

Unified Diff: ui/compositor/compositor.cc

Issue 307963007: Removes ContextFactory::Get/SetInstance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix aura_bench 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') | no next file » | 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 7a1b2928a8890ac7d73b46511fa8191782788865..325425cf47d40fce656615e85fdb60a1e79f7401 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -35,26 +35,12 @@ namespace {
const double kDefaultRefreshRate = 60.0;
const double kTestRefreshRate = 200.0;
-ui::ContextFactory* g_context_factory = NULL;
-
const int kCompositorLockTimeoutMs = 67;
} // namespace
namespace ui {
-// static
-ContextFactory* ContextFactory::GetInstance() {
- DCHECK(g_context_factory);
- return g_context_factory;
-}
-
-// static
-void ContextFactory::SetInstance(ContextFactory* instance) {
- DCHECK_NE(!!g_context_factory, !!instance);
- g_context_factory = instance;
-}
-
CompositorLock::CompositorLock(Compositor* compositor)
: compositor_(compositor) {
base::MessageLoop::current()->PostDelayedTask(
@@ -82,25 +68,6 @@ namespace {
namespace ui {
-Compositor::Compositor(gfx::AcceleratedWidget widget)
- : context_factory_(g_context_factory),
- root_layer_(NULL),
- widget_(widget),
- compositor_thread_loop_(g_context_factory->GetCompositorMessageLoop()),
- vsync_manager_(new CompositorVSyncManager()),
- device_scale_factor_(0.0f),
- last_started_frame_(0),
- last_ended_frame_(0),
- disable_schedule_composite_(false),
- compositor_lock_(NULL),
- defer_draw_scheduling_(false),
- waiting_on_compositing_end_(false),
- draw_on_compositing_end_(false),
- swap_state_(SWAP_NONE),
- schedule_draw_factory_(this) {
- Init();
-}
-
Compositor::Compositor(gfx::AcceleratedWidget widget,
ui::ContextFactory* context_factory)
: context_factory_(context_factory),
@@ -118,12 +85,6 @@ Compositor::Compositor(gfx::AcceleratedWidget widget,
draw_on_compositing_end_(false),
swap_state_(SWAP_NONE),
schedule_draw_factory_(this) {
- Init();
-}
-
-// Yes, this is the wrong place. I'm leaving here to minimize diffs since this
-// function will be nuked soonish.
-void Compositor::Init() {
root_web_layer_ = cc::Layer::Create();
root_web_layer_->SetAnchorPoint(gfx::PointF(0.f, 0.f));
« no previous file with comments | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698