| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #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 "ui/gfx/canvas.h" | 9 #include "ui/gfx/canvas.h" |
| 10 #include "ui/gfx/image/image.h" | 10 #include "ui/gfx/image/image.h" |
| 11 #include "ui/gfx/transform.h" | 11 #include "ui/gfx/transform.h" |
| 12 #include "third_party/skia/include/core/SkColor.h" | 12 #include "third_party/skia/include/core/SkColor.h" |
| 13 #include "third_party/skia/include/core/SkXfermode.h" | 13 #include "third_party/skia/include/core/SkXfermode.h" |
| 14 | 14 |
| 15 using std::max; | 15 using std::max; |
| 16 using std::min; | 16 using std::min; |
| 17 | 17 |
| 18 namespace aura_shell { | 18 namespace ash { |
| 19 namespace internal { | 19 namespace internal { |
| 20 | 20 |
| 21 gfx::Rect ImageGrid::TestAPI::GetTransformedLayerBounds( | 21 gfx::Rect ImageGrid::TestAPI::GetTransformedLayerBounds( |
| 22 const ui::Layer& layer) { | 22 const ui::Layer& layer) { |
| 23 gfx::Rect bounds = layer.bounds(); | 23 gfx::Rect bounds = layer.bounds(); |
| 24 layer.transform().TransformRect(&bounds); | 24 layer.transform().TransformRect(&bounds); |
| 25 return bounds; | 25 return bounds; |
| 26 } | 26 } |
| 27 | 27 |
| 28 ImageGrid::ImageGrid() | 28 ImageGrid::ImageGrid() |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 layer_ptr->get()->SetBounds(gfx::Rect(0, 0, size.width(), size.height())); | 236 layer_ptr->get()->SetBounds(gfx::Rect(0, 0, size.width(), size.height())); |
| 237 | 237 |
| 238 painter_ptr->reset(new ImagePainter(image)); | 238 painter_ptr->reset(new ImagePainter(image)); |
| 239 layer_ptr->get()->set_delegate(painter_ptr->get()); | 239 layer_ptr->get()->set_delegate(painter_ptr->get()); |
| 240 layer_ptr->get()->SetFillsBoundsOpaquely(false); | 240 layer_ptr->get()->SetFillsBoundsOpaquely(false); |
| 241 layer_ptr->get()->SetVisible(true); | 241 layer_ptr->get()->SetVisible(true); |
| 242 layer_->Add(layer_ptr->get()); | 242 layer_->Add(layer_ptr->get()); |
| 243 } | 243 } |
| 244 | 244 |
| 245 } // namespace internal | 245 } // namespace internal |
| 246 } // namespace aura_shell | 246 } // namespace ash |
| OLD | NEW |