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

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

Issue 2251143002: cc: Reland Move data to LayerTree from LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 4 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
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 DCHECK_EQ(layer_impl->is_mask(), is_mask_); 56 DCHECK_EQ(layer_impl->is_mask(), is_mask_);
57 DropRecordingSourceContentIfInvalid(); 57 DropRecordingSourceContentIfInvalid();
58 58
59 layer_impl->SetNearestNeighbor(picture_layer_inputs_.nearest_neighbor); 59 layer_impl->SetNearestNeighbor(picture_layer_inputs_.nearest_neighbor);
60 60
61 // Preserve lcd text settings from the current raster source. 61 // Preserve lcd text settings from the current raster source.
62 bool can_use_lcd_text = layer_impl->RasterSourceUsesLCDText(); 62 bool can_use_lcd_text = layer_impl->RasterSourceUsesLCDText();
63 scoped_refptr<RasterSource> raster_source = 63 scoped_refptr<RasterSource> raster_source =
64 recording_source_->CreateRasterSource(can_use_lcd_text); 64 recording_source_->CreateRasterSource(can_use_lcd_text);
65 layer_impl->set_gpu_raster_max_texture_size( 65 layer_impl->set_gpu_raster_max_texture_size(
66 layer_tree_host()->device_viewport_size()); 66 GetLayerTree()->device_viewport_size());
67 layer_impl->UpdateRasterSource(raster_source, &last_updated_invalidation_, 67 layer_impl->UpdateRasterSource(raster_source, &last_updated_invalidation_,
68 nullptr); 68 nullptr);
69 DCHECK(last_updated_invalidation_.IsEmpty()); 69 DCHECK(last_updated_invalidation_.IsEmpty());
70 } 70 }
71 71
72 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) { 72 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) {
73 Layer::SetLayerTreeHost(host); 73 Layer::SetLayerTreeHost(host);
74 if (!host) 74 if (!host)
75 return; 75 return;
76 76
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 picture_layer_inputs_.display_list = nullptr; 310 picture_layer_inputs_.display_list = nullptr;
311 picture_layer_inputs_.painter_reported_memory_usage = 0; 311 picture_layer_inputs_.painter_reported_memory_usage = 0;
312 } 312 }
313 } 313 }
314 314
315 const DisplayItemList* PictureLayer::GetDisplayItemList() { 315 const DisplayItemList* PictureLayer::GetDisplayItemList() {
316 return picture_layer_inputs_.display_list.get(); 316 return picture_layer_inputs_.display_list.get();
317 } 317 }
318 318
319 } // namespace cc 319 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698