OLD | NEW |
---|---|
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 "cc/layers/content_layer_client.h" | 8 #include "cc/layers/content_layer_client.h" |
9 #include "cc/layers/picture_layer_impl.h" | 9 #include "cc/layers/picture_layer_impl.h" |
10 #include "cc/resources/display_list_recording_source.h" | 10 #include "cc/resources/display_list_recording_source.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 recording_source_->SetEmptyBounds(); | 66 recording_source_->SetEmptyBounds(); |
67 } | 67 } |
68 | 68 |
69 layer_impl->SetNearestNeighbor(nearest_neighbor_); | 69 layer_impl->SetNearestNeighbor(nearest_neighbor_); |
70 | 70 |
71 // Preserve lcd text settings from the current raster source. | 71 // Preserve lcd text settings from the current raster source. |
72 bool can_use_lcd_text = layer_impl->RasterSourceUsesLCDText(); | 72 bool can_use_lcd_text = layer_impl->RasterSourceUsesLCDText(); |
73 scoped_refptr<RasterSource> raster_source = | 73 scoped_refptr<RasterSource> raster_source = |
74 recording_source_->CreateRasterSource(can_use_lcd_text); | 74 recording_source_->CreateRasterSource(can_use_lcd_text); |
75 layer_impl->UpdateRasterSource(raster_source, &recording_invalidation_, | 75 layer_impl->UpdateRasterSource(raster_source, &recording_invalidation_, |
76 nullptr); | 76 nullptr, |
77 layer_tree_host()->device_viewport_size()); | |
enne (OOO)
2015/03/19 22:37:00
How does this work if push properties is skipped.
| |
77 DCHECK(recording_invalidation_.IsEmpty()); | 78 DCHECK(recording_invalidation_.IsEmpty()); |
78 } | 79 } |
79 | 80 |
80 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) { | 81 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) { |
81 Layer::SetLayerTreeHost(host); | 82 Layer::SetLayerTreeHost(host); |
82 if (!host) | 83 if (!host) |
83 return; | 84 return; |
84 | 85 |
85 if (!recording_source_) { | 86 if (!recording_source_) { |
86 if (host->settings().use_display_lists) { | 87 if (host->settings().use_display_lists) { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 | 207 |
207 bool PictureLayer::HasDrawableContent() const { | 208 bool PictureLayer::HasDrawableContent() const { |
208 return client_ && Layer::HasDrawableContent(); | 209 return client_ && Layer::HasDrawableContent(); |
209 } | 210 } |
210 | 211 |
211 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { | 212 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { |
212 benchmark->RunOnLayer(this); | 213 benchmark->RunOnLayer(this); |
213 } | 214 } |
214 | 215 |
215 } // namespace cc | 216 } // namespace cc |
OLD | NEW |