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

Side by Side Diff: cc/resources/layer_tiling_data.h

Issue 1099383002: Change ScopedPtrHashMap's 2nd template parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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/output/direct_renderer.cc ('k') | cc/surfaces/surface_aggregator.h » ('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_RESOURCES_LAYER_TILING_DATA_H_ 5 #ifndef CC_RESOURCES_LAYER_TILING_DATA_H_
6 #define CC_RESOURCES_LAYER_TILING_DATA_H_ 6 #define CC_RESOURCES_LAYER_TILING_DATA_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 i_ = i; 62 i_ = i;
63 j_ = j; 63 j_ = j;
64 } 64 }
65 65
66 private: 66 private:
67 int i_; 67 int i_;
68 int j_; 68 int j_;
69 DISALLOW_COPY_AND_ASSIGN(Tile); 69 DISALLOW_COPY_AND_ASSIGN(Tile);
70 }; 70 };
71 typedef std::pair<int, int> TileMapKey; 71 typedef std::pair<int, int> TileMapKey;
72 typedef base::ScopedPtrHashMap<TileMapKey, Tile> TileMap; 72 typedef base::ScopedPtrHashMap<TileMapKey, scoped_ptr<Tile>> TileMap;
73 73
74 void AddTile(scoped_ptr<Tile> tile, int i, int j); 74 void AddTile(scoped_ptr<Tile> tile, int i, int j);
75 scoped_ptr<Tile> TakeTile(int i, int j); 75 scoped_ptr<Tile> TakeTile(int i, int j);
76 Tile* TileAt(int i, int j) const; 76 Tile* TileAt(int i, int j) const;
77 const TileMap& tiles() const { return tiles_; } 77 const TileMap& tiles() const { return tiles_; }
78 78
79 void SetTilingSize(const gfx::Size& tiling_size); 79 void SetTilingSize(const gfx::Size& tiling_size);
80 gfx::Size tiling_size() const { return tiling_data_.tiling_size(); } 80 gfx::Size tiling_size() const { return tiling_data_.tiling_size(); }
81 81
82 void ContentRectToTileIndices(const gfx::Rect& rect, 82 void ContentRectToTileIndices(const gfx::Rect& rect,
(...skipping 10 matching lines...) Expand all
93 93
94 TileMap tiles_; 94 TileMap tiles_;
95 TilingData tiling_data_; 95 TilingData tiling_data_;
96 96
97 DISALLOW_COPY(LayerTilingData); 97 DISALLOW_COPY(LayerTilingData);
98 }; 98 };
99 99
100 } // namespace cc 100 } // namespace cc
101 101
102 #endif // CC_RESOURCES_LAYER_TILING_DATA_H_ 102 #endif // CC_RESOURCES_LAYER_TILING_DATA_H_
OLDNEW
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/surfaces/surface_aggregator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698