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

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

Issue 10690168: Aura: Resize locks with --ui-enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved needing to kick a frame logic up to RWHVA from Compositor. Created 8 years, 2 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/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 return true; 440 return true;
441 } 441 }
442 442
443 void Layer::ScheduleDraw() { 443 void Layer::ScheduleDraw() {
444 Compositor* compositor = GetCompositor(); 444 Compositor* compositor = GetCompositor();
445 if (compositor) 445 if (compositor)
446 compositor->ScheduleDraw(); 446 compositor->ScheduleDraw();
447 } 447 }
448 448
449 void Layer::SendDamagedRects() { 449 void Layer::SendDamagedRects() {
450 if (web_layer_->deferUpdates())
451 return;
452
450 if ((delegate_ || texture_) && !damaged_region_.isEmpty()) { 453 if ((delegate_ || texture_) && !damaged_region_.isEmpty()) {
451 for (SkRegion::Iterator iter(damaged_region_); 454 for (SkRegion::Iterator iter(damaged_region_);
452 !iter.done(); iter.next()) { 455 !iter.done(); iter.next()) {
453 const SkIRect& sk_damaged = iter.rect(); 456 const SkIRect& sk_damaged = iter.rect();
454 gfx::Rect damaged( 457 gfx::Rect damaged(
455 sk_damaged.x(), 458 sk_damaged.x(),
456 sk_damaged.y(), 459 sk_damaged.y(),
457 sk_damaged.width(), 460 sk_damaged.width(),
458 sk_damaged.height()); 461 sk_damaged.height());
459 462
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 return; 797 return;
795 unsigned int color = 0xFF000000; 798 unsigned int color = 0xFF000000;
796 color |= web_layer_is_accelerated_ ? 0x0000FF00 : 0x00FF0000; 799 color |= web_layer_is_accelerated_ ? 0x0000FF00 : 0x00FF0000;
797 bool opaque = fills_bounds_opaquely_ && (GetCombinedOpacity() == 1.f); 800 bool opaque = fills_bounds_opaquely_ && (GetCombinedOpacity() == 1.f);
798 if (!opaque) 801 if (!opaque)
799 color |= 0xFF; 802 color |= 0xFF;
800 web_layer_->setDebugBorderColor(color); 803 web_layer_->setDebugBorderColor(color);
801 } 804 }
802 805
803 } // namespace ui 806 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698