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 #include "skia/ext/vector_platform_device_skia.h" | 5 #include "skia/ext/vector_platform_device_skia.h" |
6 | 6 |
7 #include "skia/ext/bitmap_platform_device.h" | 7 #include "skia/ext/bitmap_platform_device.h" |
8 #include "third_party/skia/include/core/SkClipStack.h" | 8 #include "third_party/skia/include/core/SkClipStack.h" |
9 #include "third_party/skia/include/core/SkDraw.h" | 9 #include "third_party/skia/include/core/SkDraw.h" |
10 #include "third_party/skia/include/core/SkRect.h" | 10 #include "third_party/skia/include/core/SkRect.h" |
11 #include "third_party/skia/include/core/SkRegion.h" | 11 #include "third_party/skia/include/core/SkRegion.h" |
12 #include "third_party/skia/include/core/SkScalar.h" | 12 #include "third_party/skia/include/core/SkScalar.h" |
13 | 13 |
14 namespace skia { | 14 namespace skia { |
15 | 15 |
16 static inline SkBitmap makeABitmap(int width, int height) { | 16 static inline SkBitmap makeABitmap(int width, int height) { |
17 SkBitmap bitmap; | 17 SkBitmap bitmap; |
18 bitmap.setConfig(SkBitmap::kNo_Config, width, height); | 18 bitmap.setInfo(SkImageInfo::MakeUnknown(width, height)); |
19 return bitmap; | 19 return bitmap; |
20 } | 20 } |
21 | 21 |
22 VectorPlatformDeviceSkia::VectorPlatformDeviceSkia( | 22 VectorPlatformDeviceSkia::VectorPlatformDeviceSkia( |
23 const SkISize& pageSize, | 23 const SkISize& pageSize, |
24 const SkISize& contentSize, | 24 const SkISize& contentSize, |
25 const SkMatrix& initialTransform) | 25 const SkMatrix& initialTransform) |
26 : SkPDFDevice(pageSize, contentSize, initialTransform) { | 26 : SkPDFDevice(pageSize, contentSize, initialTransform) { |
27 SetPlatformDevice(this, this); | 27 SetPlatformDevice(this, this); |
28 } | 28 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 79 } |
80 #elif defined(OS_POSIX) | 80 #elif defined(OS_POSIX) |
81 void VectorPlatformDeviceSkia::DrawToNativeContext( | 81 void VectorPlatformDeviceSkia::DrawToNativeContext( |
82 PlatformSurface surface, int x, int y, const PlatformRect* src_rect) { | 82 PlatformSurface surface, int x, int y, const PlatformRect* src_rect) { |
83 // Should never be called on Linux. | 83 // Should never be called on Linux. |
84 SkASSERT(false); | 84 SkASSERT(false); |
85 } | 85 } |
86 #endif | 86 #endif |
87 | 87 |
88 } // namespace skia | 88 } // namespace skia |
OLD | NEW |