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

Side by Side Diff: cc/layers/picture_layer.cc

Issue 15995031: cc: Don't clear transparent piles to an opaque color (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/picture_layer_impl.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/layers/picture_layer.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include "cc/debug/devtools_instrumentation.h" 7 #include "cc/debug/devtools_instrumentation.h"
8 #include "cc/layers/picture_layer_impl.h" 8 #include "cc/layers/picture_layer_impl.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 #include "ui/gfx/rect_conversions.h" 10 #include "ui/gfx/rect_conversions.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // Calling paint in WebKit can sometimes cause invalidations, so save 85 // Calling paint in WebKit can sometimes cause invalidations, so save
86 // off the invalidation prior to calling update. 86 // off the invalidation prior to calling update.
87 pile_invalidation_.Swap(&pending_invalidation_); 87 pile_invalidation_.Swap(&pending_invalidation_);
88 pending_invalidation_.Clear(); 88 pending_invalidation_.Clear();
89 89
90 gfx::Rect visible_layer_rect = gfx::ScaleToEnclosingRect( 90 gfx::Rect visible_layer_rect = gfx::ScaleToEnclosingRect(
91 visible_content_rect(), 1.f / contents_scale_x()); 91 visible_content_rect(), 1.f / contents_scale_x());
92 devtools_instrumentation::ScopedLayerTask paint_layer( 92 devtools_instrumentation::ScopedLayerTask paint_layer(
93 devtools_instrumentation::kPaintLayer, id()); 93 devtools_instrumentation::kPaintLayer, id());
94 pile_->Update(client_, 94 pile_->Update(client_,
95 background_color(), 95 SafeOpaqueBackgroundColor(),
96 pile_invalidation_, 96 pile_invalidation_,
97 visible_layer_rect, 97 visible_layer_rect,
98 stats); 98 stats);
99 } 99 }
100 100
101 void PictureLayer::SetIsMask(bool is_mask) { 101 void PictureLayer::SetIsMask(bool is_mask) {
102 is_mask_ = is_mask; 102 is_mask_ = is_mask;
103 } 103 }
104 104
105 bool PictureLayer::SupportsLCDText() const { 105 bool PictureLayer::SupportsLCDText() const {
106 return true; 106 return true;
107 } 107 }
108 108
109 } // namespace cc 109 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698