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

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

Issue 12954006: Let AreVisibleResourcesReady return correct value for PictureImageLayerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep source scales; New ShouldAdjustRasterScale Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_image_layer_impl.h" 5 #include "cc/layers/picture_image_layer_impl.h"
6 6
7 #include "cc/debug/debug_colors.h" 7 #include "cc/debug/debug_colors.h"
8 #include "cc/trees/layer_tree_impl.h" 8 #include "cc/trees/layer_tree_impl.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 13 matching lines...) Expand all
24 LayerTreeImpl* tree_impl) { 24 LayerTreeImpl* tree_impl) {
25 return PictureImageLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); 25 return PictureImageLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
26 } 26 }
27 27
28 void PictureImageLayerImpl::GetDebugBorderProperties( 28 void PictureImageLayerImpl::GetDebugBorderProperties(
29 SkColor* color, float* width) const { 29 SkColor* color, float* width) const {
30 *color = DebugColors::ImageLayerBorderColor(); 30 *color = DebugColors::ImageLayerBorderColor();
31 *width = DebugColors::ImageLayerBorderWidth(layer_tree_impl()); 31 *width = DebugColors::ImageLayerBorderWidth(layer_tree_impl());
32 } 32 }
33 33
34 bool PictureImageLayerImpl::ShouldAdjustRasterScale(bool) const {
danakj 2013/03/25 20:13:03 please give the variable its name
Xianzhu 2013/03/25 20:42:23 Done.
35 return false;
36 }
37
34 void PictureImageLayerImpl::CalculateRasterContentsScale( 38 void PictureImageLayerImpl::CalculateRasterContentsScale(
35 bool animating_transform_to_screen, 39 bool animating_transform_to_screen,
36 float* raster_contents_scale, 40 float* raster_contents_scale,
37 float* low_res_raster_contents_scale) { 41 float* low_res_raster_contents_scale) const {
38 // Don't scale images during rastering to ensure image quality, save memory 42 // Don't scale images during rastering to ensure image quality, save memory
39 // and avoid frequent re-rastering on change of scale. 43 // and avoid frequent re-rastering on change of scale.
40 *raster_contents_scale = std::max(1.f, MinimumContentsScale()); 44 *raster_contents_scale = std::max(1.f, MinimumContentsScale());
41 // We don't need low res tiles. 45 // We don't need low res tiles.
42 *low_res_raster_contents_scale = *raster_contents_scale; 46 *low_res_raster_contents_scale = *raster_contents_scale;
43 } 47 }
44 48
45 } // namespace cc 49 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698