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

Side by Side Diff: ui/aura/root_window.cc

Issue 13555004: Aura: Make compositor_unittests work with --ui-enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Set the delegates. DCHECK not called if threaded. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/compositor/compositor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 ui::EventTarget* RootWindow::GetParentTarget() { 540 ui::EventTarget* RootWindow::GetParentTarget() {
541 return client::GetEventClient(this) ? 541 return client::GetEventClient(this) ?
542 client::GetEventClient(this)->GetToplevelEventTarget() : 542 client::GetEventClient(this)->GetToplevelEventTarget() :
543 Env::GetInstance(); 543 Env::GetInstance();
544 } 544 }
545 545
546 //////////////////////////////////////////////////////////////////////////////// 546 ////////////////////////////////////////////////////////////////////////////////
547 // RootWindow, ui::CompositorDelegate implementation: 547 // RootWindow, ui::CompositorDelegate implementation:
548 548
549 void RootWindow::ScheduleDraw() { 549 void RootWindow::ScheduleDraw() {
550 DCHECK(!ui::Compositor::WasInitializedWithThread());
550 if (!defer_draw_scheduling_) { 551 if (!defer_draw_scheduling_) {
551 defer_draw_scheduling_ = true; 552 defer_draw_scheduling_ = true;
552 MessageLoop::current()->PostTask( 553 MessageLoop::current()->PostTask(
553 FROM_HERE, 554 FROM_HERE,
554 base::Bind(&RootWindow::Draw, schedule_paint_factory_.GetWeakPtr())); 555 base::Bind(&RootWindow::Draw, schedule_paint_factory_.GetWeakPtr()));
555 } 556 }
556 } 557 }
557 558
558 //////////////////////////////////////////////////////////////////////////////// 559 ////////////////////////////////////////////////////////////////////////////////
559 // RootWindow, ui::CompositorObserver implementation: 560 // RootWindow, ui::CompositorObserver implementation:
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 } 1182 }
1182 1183
1183 gfx::Transform RootWindow::GetInverseRootTransform() const { 1184 gfx::Transform RootWindow::GetInverseRootTransform() const {
1184 float scale = ui::GetDeviceScaleFactor(layer()); 1185 float scale = ui::GetDeviceScaleFactor(layer());
1185 gfx::Transform transform; 1186 gfx::Transform transform;
1186 transform.Scale(1.0f / scale, 1.0f / scale); 1187 transform.Scale(1.0f / scale, 1.0f / scale);
1187 return transformer_->GetInverseTransform() * transform; 1188 return transformer_->GetInverseTransform() * transform;
1188 } 1189 }
1189 1190
1190 } // namespace aura 1191 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698