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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // longer valid. In this case just destroy the recording source. | 65 // longer valid. In this case just destroy the recording source. |
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->set_gpu_raster_max_texture_size( |
| 76 layer_tree_host()->device_viewport_size()); |
75 layer_impl->UpdateRasterSource(raster_source, &recording_invalidation_, | 77 layer_impl->UpdateRasterSource(raster_source, &recording_invalidation_, |
76 nullptr); | 78 nullptr); |
77 DCHECK(recording_invalidation_.IsEmpty()); | 79 DCHECK(recording_invalidation_.IsEmpty()); |
78 } | 80 } |
79 | 81 |
80 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) { | 82 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) { |
81 Layer::SetLayerTreeHost(host); | 83 Layer::SetLayerTreeHost(host); |
82 if (!host) | 84 if (!host) |
83 return; | 85 return; |
84 | 86 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 208 |
207 bool PictureLayer::HasDrawableContent() const { | 209 bool PictureLayer::HasDrawableContent() const { |
208 return client_ && Layer::HasDrawableContent(); | 210 return client_ && Layer::HasDrawableContent(); |
209 } | 211 } |
210 | 212 |
211 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { | 213 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { |
212 benchmark->RunOnLayer(this); | 214 benchmark->RunOnLayer(this); |
213 } | 215 } |
214 | 216 |
215 } // namespace cc | 217 } // namespace cc |
OLD | NEW |