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

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

Issue 1024633002: cc: Keep tilings texture size in sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address vmp's comments Created 5 years, 9 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') | cc/layers/picture_layer_impl.h » ('J')
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 "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
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
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
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.h » ('j') | cc/layers/picture_layer_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698