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

Side by Side Diff: cc/layer_tiling_data.cc

Issue 11275113: Remove most remaining references to IntRect and FloatRect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compositor bindings Created 8 years, 1 month 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_tiling_data.h ('k') | cc/layer_tree_host.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 5
6 #include "config.h" 6 #include "config.h"
7 7
8 #include "cc/layer_tiling_data.h" 8 #include "cc/layer_tiling_data.h"
9 9
10 #include "IntRect.h"
11 #include "IntSize.h"
10 #include "base/logging.h" 12 #include "base/logging.h"
11 13
12 using namespace std; 14 using namespace std;
13 15
14 namespace cc { 16 namespace cc {
15 17
16 scoped_ptr<LayerTilingData> LayerTilingData::create(const gfx::Size& tileSize, B orderTexelOption border) 18 scoped_ptr<LayerTilingData> LayerTilingData::create(const gfx::Size& tileSize, B orderTexelOption border)
17 { 19 {
18 return make_scoped_ptr(new LayerTilingData(tileSize, border)); 20 return make_scoped_ptr(new LayerTilingData(tileSize, border));
19 } 21 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 Region opaqueRegion; 112 Region opaqueRegion;
111 int left, top, right, bottom; 113 int left, top, right, bottom;
112 contentRectToTileIndices(contentRect, left, top, right, bottom); 114 contentRectToTileIndices(contentRect, left, top, right, bottom);
113 for (int j = top; j <= bottom; ++j) { 115 for (int j = top; j <= bottom; ++j) {
114 for (int i = left; i <= right; ++i) { 116 for (int i = left; i <= right; ++i) {
115 Tile* tile = tileAt(i, j); 117 Tile* tile = tileAt(i, j);
116 if (!tile) 118 if (!tile)
117 continue; 119 continue;
118 120
119 gfx::Rect tileOpaqueRect = gfx::IntersectRects(contentRect, tile->op aqueRect()); 121 gfx::Rect tileOpaqueRect = gfx::IntersectRects(contentRect, tile->op aqueRect());
120 opaqueRegion.unite(cc::IntRect(tileOpaqueRect)); 122 opaqueRegion.Union(tileOpaqueRect);
121 } 123 }
122 } 124 }
123 return opaqueRegion; 125 return opaqueRegion;
124 } 126 }
125 127
126 void LayerTilingData::setBounds(const gfx::Size& size) 128 void LayerTilingData::setBounds(const gfx::Size& size)
127 { 129 {
128 m_tilingData.setTotalSize(cc::IntSize(size)); 130 m_tilingData.setTotalSize(cc::IntSize(size));
129 if (size.IsEmpty()) { 131 if (size.IsEmpty()) {
130 m_tiles.clear(); 132 m_tiles.clear();
(...skipping 11 matching lines...) Expand all
142 for (size_t i = 0; i < invalidTileKeys.size(); ++i) 144 for (size_t i = 0; i < invalidTileKeys.size(); ++i)
143 m_tiles.erase(invalidTileKeys[i]); 145 m_tiles.erase(invalidTileKeys[i]);
144 } 146 }
145 147
146 gfx::Size LayerTilingData::bounds() const 148 gfx::Size LayerTilingData::bounds() const
147 { 149 {
148 return cc::IntSize(m_tilingData.totalSize()); 150 return cc::IntSize(m_tilingData.totalSize());
149 } 151 }
150 152
151 } // namespace cc 153 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tiling_data.h ('k') | cc/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698