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

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

Issue 2781183002: Remove image_decode_tasks_enabled flag. (Closed)
Patch Set: fixes Created 3 years, 8 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_unittest.cc » ('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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return; 76 return;
77 77
78 if (!host->GetSettings().enable_mask_tiling && 78 if (!host->GetSettings().enable_mask_tiling &&
79 mask_type_ == LayerMaskType::MULTI_TEXTURE_MASK) 79 mask_type_ == LayerMaskType::MULTI_TEXTURE_MASK)
80 mask_type_ = LayerMaskType::SINGLE_TEXTURE_MASK; 80 mask_type_ = LayerMaskType::SINGLE_TEXTURE_MASK;
81 81
82 if (!recording_source_) 82 if (!recording_source_)
83 recording_source_.reset(new RecordingSource); 83 recording_source_.reset(new RecordingSource);
84 recording_source_->SetSlowdownRasterScaleFactor( 84 recording_source_->SetSlowdownRasterScaleFactor(
85 host->GetDebugState().slow_down_raster_scale_factor); 85 host->GetDebugState().slow_down_raster_scale_factor);
86 // If we need to enable image decode tasks, then we have to generate the
87 // discardable images metadata.
88 const LayerTreeSettings& settings = layer_tree_host()->GetSettings();
89 recording_source_->SetGenerateDiscardableImagesMetadata(
90 settings.image_decode_tasks_enabled);
91 } 86 }
92 87
93 void PictureLayer::SetNeedsDisplayRect(const gfx::Rect& layer_rect) { 88 void PictureLayer::SetNeedsDisplayRect(const gfx::Rect& layer_rect) {
94 DCHECK(!layer_tree_host() || !layer_tree_host()->in_paint_layer_contents()); 89 DCHECK(!layer_tree_host() || !layer_tree_host()->in_paint_layer_contents());
95 if (recording_source_) 90 if (recording_source_)
96 recording_source_->SetNeedsDisplayRect(layer_rect); 91 recording_source_->SetNeedsDisplayRect(layer_rect);
97 Layer::SetNeedsDisplayRect(layer_rect); 92 Layer::SetNeedsDisplayRect(layer_rect);
98 } 93 }
99 94
100 bool PictureLayer::Update() { 95 bool PictureLayer::Update() {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 return false; 276 return false;
282 277
283 return true; 278 return true;
284 } 279 }
285 280
286 const DisplayItemList* PictureLayer::GetDisplayItemList() { 281 const DisplayItemList* PictureLayer::GetDisplayItemList() {
287 return picture_layer_inputs_.display_list.get(); 282 return picture_layer_inputs_.display_list.get();
288 } 283 }
289 284
290 } // namespace cc 285 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698