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

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

Issue 2845143002: cc: Allow changing mask type when pushing properties. (Closed)
Patch Set: Add comment to SetLayerMaskType Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.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 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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "cc/layers/content_layer_client.h" 9 #include "cc/layers/content_layer_client.h"
10 #include "cc/layers/picture_layer_impl.h" 10 #include "cc/layers/picture_layer_impl.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 std::unique_ptr<LayerImpl> PictureLayer::CreateLayerImpl( 44 std::unique_ptr<LayerImpl> PictureLayer::CreateLayerImpl(
45 LayerTreeImpl* tree_impl) { 45 LayerTreeImpl* tree_impl) {
46 return PictureLayerImpl::Create(tree_impl, id(), mask_type_); 46 return PictureLayerImpl::Create(tree_impl, id(), mask_type_);
47 } 47 }
48 48
49 void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) { 49 void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
50 Layer::PushPropertiesTo(base_layer); 50 Layer::PushPropertiesTo(base_layer);
51 TRACE_EVENT0("cc", "PictureLayer::PushPropertiesTo"); 51 TRACE_EVENT0("cc", "PictureLayer::PushPropertiesTo");
52 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); 52 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
53 // TODO(danakj): Make mask_type_ a constructor parameter for PictureLayer. 53 layer_impl->SetLayerMaskType(mask_type());
54 DCHECK_EQ(layer_impl->mask_type(), mask_type());
55 DropRecordingSourceContentIfInvalid(); 54 DropRecordingSourceContentIfInvalid();
56 55
57 layer_impl->SetNearestNeighbor(picture_layer_inputs_.nearest_neighbor); 56 layer_impl->SetNearestNeighbor(picture_layer_inputs_.nearest_neighbor);
58 layer_impl->SetUseTransformedRasterization( 57 layer_impl->SetUseTransformedRasterization(
59 ShouldUseTransformedRasterization()); 58 ShouldUseTransformedRasterization());
60 59
61 // Preserve lcd text settings from the current raster source. 60 // Preserve lcd text settings from the current raster source.
62 bool can_use_lcd_text = layer_impl->RasterSourceUsesLCDText(); 61 bool can_use_lcd_text = layer_impl->RasterSourceUsesLCDText();
63 scoped_refptr<RasterSource> raster_source = 62 scoped_refptr<RasterSource> raster_source =
64 recording_source_->CreateRasterSource(can_use_lcd_text); 63 recording_source_->CreateRasterSource(can_use_lcd_text);
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 return false; 275 return false;
277 276
278 return true; 277 return true;
279 } 278 }
280 279
281 const DisplayItemList* PictureLayer::GetDisplayItemList() { 280 const DisplayItemList* PictureLayer::GetDisplayItemList() {
282 return picture_layer_inputs_.display_list.get(); 281 return picture_layer_inputs_.display_list.get();
283 } 282 }
284 283
285 } // namespace cc 284 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698