OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "gfx/canvas_skia.h" | 5 #include "ui/gfx/canvas_skia.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "gfx/brush.h" | |
12 #include "gfx/font.h" | |
13 #include "gfx/rect.h" | |
14 #include "third_party/skia/include/effects/SkGradientShader.h" | 11 #include "third_party/skia/include/effects/SkGradientShader.h" |
| 12 #include "ui/gfx/brush.h" |
| 13 #include "ui/gfx/font.h" |
| 14 #include "ui/gfx/rect.h" |
15 | 15 |
16 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
17 #include "gfx/canvas_skia_paint.h" | 17 #include "ui/gfx/canvas_skia_paint.h" |
18 #endif | 18 #endif |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // A platform wrapper for a Skia shader that makes sure the underlying | 22 // A platform wrapper for a Skia shader that makes sure the underlying |
23 // SkShader object is unref'ed when this object is destroyed. | 23 // SkShader object is unref'ed when this object is destroyed. |
24 class SkiaShader : public gfx::Brush { | 24 class SkiaShader : public gfx::Brush { |
25 public: | 25 public: |
26 explicit SkiaShader(SkShader* shader) : shader_(shader) { | 26 explicit SkiaShader(SkShader* shader) : shader_(shader) { |
27 } | 27 } |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 382 |
383 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { | 383 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { |
384 #if defined(OS_WIN) | 384 #if defined(OS_WIN) |
385 return new CanvasPaintWin(view); | 385 return new CanvasPaintWin(view); |
386 #else | 386 #else |
387 return NULL; | 387 return NULL; |
388 #endif | 388 #endif |
389 } | 389 } |
390 | 390 |
391 } // namespace gfx | 391 } // namespace gfx |
OLD | NEW |