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

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

Issue 23653002: Move ScopedPtrHashMap from cc to base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jam's comment Created 7 years, 3 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/quads/render_pass.h ('k') | cc/resources/worker_pool.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"
11 #include "base/containers/hash_tables.h" 11 #include "base/containers/hash_tables.h"
12 #include "base/containers/scoped_ptr_hash_map.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
14 #include "cc/base/region.h" 15 #include "cc/base/region.h"
15 #include "cc/base/scoped_ptr_hash_map.h"
16 #include "cc/base/tiling_data.h" 16 #include "cc/base/tiling_data.h"
17 #include "ui/gfx/rect.h" 17 #include "ui/gfx/rect.h"
18 18
19 namespace cc { 19 namespace cc {
20 20
21 class CC_EXPORT LayerTilingData { 21 class CC_EXPORT LayerTilingData {
22 public: 22 public:
23 enum BorderTexelOption { 23 enum BorderTexelOption {
24 HAS_BORDER_TEXELS, 24 HAS_BORDER_TEXELS,
25 NO_BORDER_TEXELS 25 NO_BORDER_TEXELS
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 gfx::Rect opaque_rect() const { return opaque_rect_; } 66 gfx::Rect opaque_rect() const { return opaque_rect_; }
67 void set_opaque_rect(gfx::Rect opaque_rect) { opaque_rect_ = opaque_rect; } 67 void set_opaque_rect(gfx::Rect opaque_rect) { opaque_rect_ = opaque_rect; }
68 private: 68 private:
69 int i_; 69 int i_;
70 int j_; 70 int j_;
71 gfx::Rect opaque_rect_; 71 gfx::Rect opaque_rect_;
72 DISALLOW_COPY_AND_ASSIGN(Tile); 72 DISALLOW_COPY_AND_ASSIGN(Tile);
73 }; 73 };
74 typedef std::pair<int, int> TileMapKey; 74 typedef std::pair<int, int> TileMapKey;
75 typedef ScopedPtrHashMap<TileMapKey, Tile> TileMap; 75 typedef base::ScopedPtrHashMap<TileMapKey, Tile> TileMap;
76 76
77 void AddTile(scoped_ptr<Tile> tile, int i, int j); 77 void AddTile(scoped_ptr<Tile> tile, int i, int j);
78 scoped_ptr<Tile> TakeTile(int i, int j); 78 scoped_ptr<Tile> TakeTile(int i, int j);
79 Tile* TileAt(int i, int j) const; 79 Tile* TileAt(int i, int j) const;
80 const TileMap& tiles() const { return tiles_; } 80 const TileMap& tiles() const { return tiles_; }
81 81
82 void SetBounds(gfx::Size size); 82 void SetBounds(gfx::Size size);
83 gfx::Size bounds() const { return tiling_data_.total_size(); } 83 gfx::Size bounds() const { return tiling_data_.total_size(); }
84 84
85 void ContentRectToTileIndices(gfx::Rect rect, 85 void ContentRectToTileIndices(gfx::Rect rect,
(...skipping 12 matching lines...) Expand all
98 98
99 TileMap tiles_; 99 TileMap tiles_;
100 TilingData tiling_data_; 100 TilingData tiling_data_;
101 101
102 DISALLOW_COPY(LayerTilingData); 102 DISALLOW_COPY(LayerTilingData);
103 }; 103 };
104 104
105 } // namespace cc 105 } // namespace cc
106 106
107 #endif // CC_RESOURCES_LAYER_TILING_DATA_H_ 107 #endif // CC_RESOURCES_LAYER_TILING_DATA_H_
OLDNEW
« no previous file with comments | « cc/quads/render_pass.h ('k') | cc/resources/worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698