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

Side by Side Diff: ui/compositor/compositor.cc

Issue 295193002: Get rid of graphics layer anchor points, and replace with transform origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 last_started_frame_(0), 79 last_started_frame_(0),
80 last_ended_frame_(0), 80 last_ended_frame_(0),
81 disable_schedule_composite_(false), 81 disable_schedule_composite_(false),
82 compositor_lock_(NULL), 82 compositor_lock_(NULL),
83 defer_draw_scheduling_(false), 83 defer_draw_scheduling_(false),
84 waiting_on_compositing_end_(false), 84 waiting_on_compositing_end_(false),
85 draw_on_compositing_end_(false), 85 draw_on_compositing_end_(false),
86 swap_state_(SWAP_NONE), 86 swap_state_(SWAP_NONE),
87 schedule_draw_factory_(this) { 87 schedule_draw_factory_(this) {
88 root_web_layer_ = cc::Layer::Create(); 88 root_web_layer_ = cc::Layer::Create();
89 root_web_layer_->SetAnchorPoint(gfx::PointF(0.f, 0.f)); 89 root_web_layer_->SetTransformOrigin(gfx::Point3F(0.f, 0.f, 0.f));
90 90
91 CommandLine* command_line = CommandLine::ForCurrentProcess(); 91 CommandLine* command_line = CommandLine::ForCurrentProcess();
92 92
93 cc::LayerTreeSettings settings; 93 cc::LayerTreeSettings settings;
94 settings.refresh_rate = 94 settings.refresh_rate =
95 context_factory_->DoesCreateTestContexts() 95 context_factory_->DoesCreateTestContexts()
96 ? kTestRefreshRate 96 ? kTestRefreshRate
97 : kDefaultRefreshRate; 97 : kDefaultRefreshRate;
98 settings.main_frame_before_draw_enabled = false; 98 settings.main_frame_before_draw_enabled = false;
99 settings.main_frame_before_activation_enabled = false; 99 settings.main_frame_before_activation_enabled = false;
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 // CompositorObservers to be notified before starting another 390 // CompositorObservers to be notified before starting another
391 // draw cycle. 391 // draw cycle.
392 ScheduleDraw(); 392 ScheduleDraw();
393 } 393 }
394 FOR_EACH_OBSERVER(CompositorObserver, 394 FOR_EACH_OBSERVER(CompositorObserver,
395 observer_list_, 395 observer_list_,
396 OnCompositingEnded(this)); 396 OnCompositingEnded(this));
397 } 397 }
398 398
399 } // namespace ui 399 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698