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

Side by Side Diff: cc/picture_layer_impl.h

Issue 11777008: cc: Use maximum tiling contents scales for picture layer scale (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ok, 1.f Created 7 years, 11 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
« no previous file with comments | « cc/layer_tree_host_common.cc ('k') | cc/picture_layer_impl.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 #ifndef CC_PICTURE_LAYER_IMPL_H_ 5 #ifndef CC_PICTURE_LAYER_IMPL_H_
6 #define CC_PICTURE_LAYER_IMPL_H_ 6 #define CC_PICTURE_LAYER_IMPL_H_
7 7
8 #include "cc/layer_impl.h" 8 #include "cc/layer_impl.h"
9 #include "cc/picture_layer_tiling.h" 9 #include "cc/picture_layer_tiling.h"
10 #include "cc/picture_layer_tiling_set.h" 10 #include "cc/picture_layer_tiling_set.h"
(...skipping 12 matching lines...) Expand all
23 { 23 {
24 return make_scoped_ptr(new PictureLayerImpl(treeImpl, id)); 24 return make_scoped_ptr(new PictureLayerImpl(treeImpl, id));
25 } 25 }
26 virtual ~PictureLayerImpl(); 26 virtual ~PictureLayerImpl();
27 27
28 // LayerImpl overrides. 28 // LayerImpl overrides.
29 virtual const char* layerTypeAsString() const OVERRIDE; 29 virtual const char* layerTypeAsString() const OVERRIDE;
30 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; 30 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE;
31 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; 31 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE;
32 virtual void didUpdateTransforms() OVERRIDE; 32 virtual void didUpdateTransforms() OVERRIDE;
33 virtual void calculateContentsScale(
34 float ideal_contents_scale,
35 float* contents_scale_x,
36 float* contents_scale_y,
37 gfx::Size* content_bounds) OVERRIDE;
33 38
34 // PictureLayerTilingClient overrides. 39 // PictureLayerTilingClient overrides.
35 virtual scoped_refptr<Tile> CreateTile(PictureLayerTiling*, 40 virtual scoped_refptr<Tile> CreateTile(PictureLayerTiling*,
36 gfx::Rect) OVERRIDE; 41 gfx::Rect) OVERRIDE;
37 42
38 // PushPropertiesTo active tree => pending tree 43 // PushPropertiesTo active tree => pending tree
39 void SyncFromActiveLayer(); 44 void SyncFromActiveLayer();
40 void SyncTiling(const PictureLayerTiling* tiling); 45 void SyncTiling(const PictureLayerTiling* tiling);
41 46
42 // Mask-related functions 47 // Mask-related functions
43 void SetIsMask(bool is_mask); 48 void SetIsMask(bool is_mask);
44 virtual ResourceProvider::ResourceId contentsResourceId() const OVERRIDE; 49 virtual ResourceProvider::ResourceId contentsResourceId() const OVERRIDE;
45 50
46 protected: 51 protected:
47 PictureLayerImpl(LayerTreeImpl* treeImpl, int id); 52 PictureLayerImpl(LayerTreeImpl* treeImpl, int id);
48 void AddTiling(float contents_scale, gfx::Size tile_size); 53 void AddTiling(float contents_scale, gfx::Size tile_size);
49 void SyncFromActiveLayer(const PictureLayerImpl* other); 54 void SyncFromActiveLayer(const PictureLayerImpl* other);
50 gfx::Size TileSize() const; 55 gfx::Size TileSize() const;
56 void ManageTilings(float ideal_contents_scale);
51 57
52 PictureLayerTilingSet tilings_; 58 PictureLayerTilingSet tilings_;
53 scoped_refptr<PicturePileImpl> pile_; 59 scoped_refptr<PicturePileImpl> pile_;
54 Region invalidation_; 60 Region invalidation_;
55 61
56 gfx::Transform last_screen_space_transform_; 62 gfx::Transform last_screen_space_transform_;
57 double last_update_time_; 63 double last_update_time_;
58 gfx::Size last_bounds_; 64 gfx::Size last_bounds_;
59 gfx::Size last_content_bounds_; 65 gfx::Size last_content_bounds_;
60 float last_content_scale_x_; 66 float last_content_scale_x_;
61 float last_content_scale_y_; 67 float last_content_scale_y_;
62 bool is_mask_; 68 bool is_mask_;
63 69
64 friend class PictureLayer; 70 friend class PictureLayer;
65 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 71 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
66 }; 72 };
67 73
68 } 74 }
69 75
70 #endif // CC_PICTURE_LAYER_IMPL_H_ 76 #endif // CC_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layer_tree_host_common.cc ('k') | cc/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698