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

Side by Side Diff: ash/wm/image_grid.cc

Issue 11275089: SkRect to gfx::Rect type conversions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use ToFlooredRectDeprecated and revert Transform API change 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
« no previous file with comments | « no previous file | cc/software_renderer.cc » ('j') | cc/software_renderer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "ash/wm/image_grid.h" 5 #include "ash/wm/image_grid.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "third_party/skia/include/core/SkXfermode.h" 10 #include "third_party/skia/include/core/SkXfermode.h"
11 #include "ui/gfx/canvas.h" 11 #include "ui/gfx/canvas.h"
12 #include "ui/gfx/image/image.h" 12 #include "ui/gfx/image/image.h"
13 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
14 #include "ui/gfx/transform.h" 14 #include "ui/gfx/transform.h"
15 15
16 using std::max; 16 using std::max;
17 using std::min; 17 using std::min;
18 18
19 namespace ash { 19 namespace ash {
20 namespace internal { 20 namespace internal {
21 21
22 gfx::Rect ImageGrid::TestAPI::GetTransformedLayerBounds( 22 gfx::Rect ImageGrid::TestAPI::GetTransformedLayerBounds(
23 const ui::Layer& layer) { 23 const ui::Layer& layer) {
24 gfx::Rect bounds = layer.bounds(); 24 gfx::RectF bounds = layer.bounds();
danakj 2012/11/01 00:59:23 I think this change isn't needed anymore?
25 layer.transform().TransformRect(&bounds); 25 layer.transform().TransformRect(&bounds);
26 return bounds; 26 return gfx::ToFlooredRectDeprecated(bounds);
27 } 27 }
28 28
29 ImageGrid::ImageGrid() 29 ImageGrid::ImageGrid()
30 : layer_(new ui::Layer(ui::LAYER_NOT_DRAWN)), 30 : layer_(new ui::Layer(ui::LAYER_NOT_DRAWN)),
31 top_image_height_(0), 31 top_image_height_(0),
32 bottom_image_height_(0), 32 bottom_image_height_(0),
33 left_image_width_(0), 33 left_image_width_(0),
34 right_image_width_(0), 34 right_image_width_(0),
35 base_top_row_height_(0), 35 base_top_row_height_(0),
36 base_bottom_row_height_(0), 36 base_bottom_row_height_(0),
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 274
275 painter_ptr->reset(new ImagePainter(image)); 275 painter_ptr->reset(new ImagePainter(image));
276 layer_ptr->get()->set_delegate(painter_ptr->get()); 276 layer_ptr->get()->set_delegate(painter_ptr->get());
277 layer_ptr->get()->SetFillsBoundsOpaquely(false); 277 layer_ptr->get()->SetFillsBoundsOpaquely(false);
278 layer_ptr->get()->SetVisible(true); 278 layer_ptr->get()->SetVisible(true);
279 layer_->Add(layer_ptr->get()); 279 layer_->Add(layer_ptr->get());
280 } 280 }
281 281
282 } // namespace internal 282 } // namespace internal
283 } // namespace ash 283 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | cc/software_renderer.cc » ('j') | cc/software_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698