OLD | NEW |
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 #ifndef UI_GFX_CANVAS_H_ | 5 #ifndef UI_GFX_CANVAS_H_ |
6 #define UI_GFX_CANVAS_H_ | 6 #define UI_GFX_CANVAS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "skia/ext/platform_canvas.h" | 13 #include "skia/ext/platform_canvas.h" |
| 14 #include "skia/ext/refptr.h" |
14 #include "ui/gfx/image/image_skia.h" | 15 #include "ui/gfx/image/image_skia.h" |
15 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
16 #include "ui/gfx/shadow_value.h" | 17 #include "ui/gfx/shadow_value.h" |
17 | 18 |
18 class SkBitmap; | 19 class SkBitmap; |
19 | 20 |
20 namespace gfx { | 21 namespace gfx { |
21 | 22 |
22 class Rect; | 23 class Rect; |
23 class Font; | 24 class Font; |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 const gfx::ImageSkiaRep& GetImageRepToPaint( | 392 const gfx::ImageSkiaRep& GetImageRepToPaint( |
392 const gfx::ImageSkia& image, | 393 const gfx::ImageSkia& image, |
393 float user_defined_scale_factor_x, | 394 float user_defined_scale_factor_x, |
394 float user_defined_scale_factor_y) const; | 395 float user_defined_scale_factor_y) const; |
395 | 396 |
396 // The device scale factor at which drawing on this canvas occurs. | 397 // The device scale factor at which drawing on this canvas occurs. |
397 // An additional scale can be applied via Canvas::Scale(). However, | 398 // An additional scale can be applied via Canvas::Scale(). However, |
398 // Canvas::Scale() does not affect |scale_factor_|. | 399 // Canvas::Scale() does not affect |scale_factor_|. |
399 ui::ScaleFactor scale_factor_; | 400 ui::ScaleFactor scale_factor_; |
400 | 401 |
401 scoped_ptr<skia::PlatformCanvas> owned_canvas_; | 402 skia::RefPtr<skia::PlatformCanvas> owned_canvas_; |
402 SkCanvas* canvas_; | 403 SkCanvas* canvas_; |
403 | 404 |
404 DISALLOW_COPY_AND_ASSIGN(Canvas); | 405 DISALLOW_COPY_AND_ASSIGN(Canvas); |
405 }; | 406 }; |
406 | 407 |
407 } // namespace gfx | 408 } // namespace gfx |
408 | 409 |
409 #endif // UI_GFX_CANVAS_H_ | 410 #endif // UI_GFX_CANVAS_H_ |
OLD | NEW |