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

Side by Side Diff: cc/layers/tiled_layer.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/scrollbar_theme_painter.h ('k') | cc/layers/tiled_layer.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_TILED_LAYER_H_ 5 #ifndef CC_LAYERS_TILED_LAYER_H_
6 #define CC_LAYERS_TILED_LAYER_H_ 6 #define CC_LAYERS_TILED_LAYER_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/layers/contents_scaling_layer.h" 9 #include "cc/layers/contents_scaling_layer.h"
10 #include "cc/resources/layer_tiling_data.h" 10 #include "cc/resources/layer_tiling_data.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void SetTextureFormat(ResourceFormat texture_format) { 50 void SetTextureFormat(ResourceFormat texture_format) {
51 texture_format_ = texture_format; 51 texture_format_ = texture_format;
52 } 52 }
53 void SetBorderTexelOption(LayerTilingData::BorderTexelOption option); 53 void SetBorderTexelOption(LayerTilingData::BorderTexelOption option);
54 size_t NumPaintedTiles() { return tiler_->tiles().size(); } 54 size_t NumPaintedTiles() { return tiler_->tiles().size(); }
55 55
56 virtual LayerUpdater* Updater() const = 0; 56 virtual LayerUpdater* Updater() const = 0;
57 virtual void CreateUpdaterIfNeeded() = 0; 57 virtual void CreateUpdaterIfNeeded() = 0;
58 58
59 // Set invalidations to be potentially repainted during Update(). 59 // Set invalidations to be potentially repainted during Update().
60 void InvalidateContentRect(gfx::Rect content_rect); 60 void InvalidateContentRect(const gfx::Rect& content_rect);
61 61
62 // Reset state on tiles that will be used for updating the layer. 62 // Reset state on tiles that will be used for updating the layer.
63 void ResetUpdateState(); 63 void ResetUpdateState();
64 64
65 // After preparing an update, returns true if more painting is needed. 65 // After preparing an update, returns true if more painting is needed.
66 bool NeedsIdlePaint(); 66 bool NeedsIdlePaint();
67 gfx::Rect IdlePaintRect(); 67 gfx::Rect IdlePaintRect();
68 68
69 bool SkipsDraw() const { return skips_draw_; } 69 bool SkipsDraw() const { return skips_draw_; }
70 70
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 int right, 103 int right,
104 int bottom, 104 int bottom,
105 bool ignore_occlusions); 105 bool ignore_occlusions);
106 void MarkTilesForUpdate(gfx::Rect* update_rect, 106 void MarkTilesForUpdate(gfx::Rect* update_rect,
107 gfx::Rect* paint_rect, 107 gfx::Rect* paint_rect,
108 int left, 108 int left,
109 int top, 109 int top,
110 int right, 110 int right,
111 int bottom, 111 int bottom,
112 bool ignore_occlusions); 112 bool ignore_occlusions);
113 void UpdateTileTextures(gfx::Rect update_rect, 113 void UpdateTileTextures(const gfx::Rect& update_rect,
114 gfx::Rect paint_rect, 114 const gfx::Rect& paint_rect,
115 int left, 115 int left,
116 int top, 116 int top,
117 int right, 117 int right,
118 int bottom, 118 int bottom,
119 ResourceUpdateQueue* queue, 119 ResourceUpdateQueue* queue,
120 const OcclusionTracker* occlusion); 120 const OcclusionTracker* occlusion);
121 void UpdateScrollPrediction(); 121 void UpdateScrollPrediction();
122 122
123 UpdatableTile* TileAt(int i, int j) const; 123 UpdatableTile* TileAt(int i, int j) const;
124 UpdatableTile* CreateTile(int i, int j); 124 UpdatableTile* CreateTile(int i, int j);
(...skipping 12 matching lines...) Expand all
137 137
138 TilingOption tiling_option_; 138 TilingOption tiling_option_;
139 scoped_ptr<LayerTilingData> tiler_; 139 scoped_ptr<LayerTilingData> tiler_;
140 140
141 DISALLOW_COPY_AND_ASSIGN(TiledLayer); 141 DISALLOW_COPY_AND_ASSIGN(TiledLayer);
142 }; 142 };
143 143
144 } // namespace cc 144 } // namespace cc
145 145
146 #endif // CC_LAYERS_TILED_LAYER_H_ 146 #endif // CC_LAYERS_TILED_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/scrollbar_theme_painter.h ('k') | cc/layers/tiled_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698