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

Side by Side Diff: cc/layers/picture_layer_impl.h

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 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
« no previous file with comments | « cc/layers/picture_image_layer.cc ('k') | cc/layers/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_LAYERS_PICTURE_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_
6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual void CalculateContentsScale(float ideal_contents_scale, 46 virtual void CalculateContentsScale(float ideal_contents_scale,
47 float device_scale_factor, 47 float device_scale_factor,
48 float page_scale_factor, 48 float page_scale_factor,
49 bool animating_transform_to_screen, 49 bool animating_transform_to_screen,
50 float* contents_scale_x, 50 float* contents_scale_x,
51 float* contents_scale_y, 51 float* contents_scale_y,
52 gfx::Size* content_bounds) OVERRIDE; 52 gfx::Size* content_bounds) OVERRIDE;
53 virtual skia::RefPtr<SkPicture> GetPicture() OVERRIDE; 53 virtual skia::RefPtr<SkPicture> GetPicture() OVERRIDE;
54 54
55 // PictureLayerTilingClient overrides. 55 // PictureLayerTilingClient overrides.
56 virtual scoped_refptr<Tile> CreateTile(PictureLayerTiling* tiling, 56 virtual scoped_refptr<Tile> CreateTile(
57 gfx::Rect content_rect) OVERRIDE; 57 PictureLayerTiling* tiling,
58 const gfx::Rect& content_rect) OVERRIDE;
58 virtual void UpdatePile(Tile* tile) OVERRIDE; 59 virtual void UpdatePile(Tile* tile) OVERRIDE;
59 virtual gfx::Size CalculateTileSize( 60 virtual gfx::Size CalculateTileSize(
60 gfx::Size content_bounds) const OVERRIDE; 61 gfx::Size content_bounds) const OVERRIDE;
61 virtual const Region* GetInvalidation() OVERRIDE; 62 virtual const Region* GetInvalidation() OVERRIDE;
62 virtual const PictureLayerTiling* GetTwinTiling( 63 virtual const PictureLayerTiling* GetTwinTiling(
63 const PictureLayerTiling* tiling) const OVERRIDE; 64 const PictureLayerTiling* tiling) const OVERRIDE;
64 65
65 // PushPropertiesTo active tree => pending tree. 66 // PushPropertiesTo active tree => pending tree.
66 void SyncTiling(const PictureLayerTiling* tiling); 67 void SyncTiling(const PictureLayerTiling* tiling);
67 68
(...skipping 25 matching lines...) Expand all
93 std::vector<PictureLayerTiling*> used_tilings); 94 std::vector<PictureLayerTiling*> used_tilings);
94 float MinimumContentsScale() const; 95 float MinimumContentsScale() const;
95 float SnappedContentsScale(float new_contents_scale); 96 float SnappedContentsScale(float new_contents_scale);
96 void UpdateLCDTextStatus(bool new_status); 97 void UpdateLCDTextStatus(bool new_status);
97 void ResetRasterScale(); 98 void ResetRasterScale();
98 void MarkVisibleResourcesAsRequired() const; 99 void MarkVisibleResourcesAsRequired() const;
99 bool MarkVisibleTilesAsRequired( 100 bool MarkVisibleTilesAsRequired(
100 PictureLayerTiling* tiling, 101 PictureLayerTiling* tiling,
101 const PictureLayerTiling* optional_twin_tiling, 102 const PictureLayerTiling* optional_twin_tiling,
102 float contents_scale, 103 float contents_scale,
103 gfx::Rect rect, 104 const gfx::Rect& rect,
104 const Region& missing_region) const; 105 const Region& missing_region) const;
105 106
106 void DoPostCommitInitializationIfNeeded() { 107 void DoPostCommitInitializationIfNeeded() {
107 if (needs_post_commit_initialization_) 108 if (needs_post_commit_initialization_)
108 DoPostCommitInitialization(); 109 DoPostCommitInitialization();
109 } 110 }
110 void DoPostCommitInitialization(); 111 void DoPostCommitInitialization();
111 112
112 bool CanHaveTilings() const; 113 bool CanHaveTilings() const;
113 bool CanHaveTilingWithScale(float contents_scale) const; 114 bool CanHaveTilingWithScale(float contents_scale) const;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 bool should_update_tile_priorities_; 148 bool should_update_tile_priorities_;
148 bool should_use_gpu_rasterization_; 149 bool should_use_gpu_rasterization_;
149 150
150 friend class PictureLayer; 151 friend class PictureLayer;
151 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 152 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
152 }; 153 };
153 154
154 } // namespace cc 155 } // namespace cc
155 156
156 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 157 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_image_layer.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698