OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
4 * | 3 * |
5 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 | 7 |
9 #include "SkDevice.h" | 8 #include "SkDevice.h" |
10 #include "SkMetaData.h" | 9 #include "SkMetaData.h" |
11 | 10 |
12 #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) | 11 #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) |
13 const SkCanvas::Config8888 SkBaseDevice::kPMColorAlias = SkCanvas::kBGRA_Pre
mul_Config8888; | 12 const SkCanvas::Config8888 SkBaseDevice::kPMColorAlias = SkCanvas::kBGRA_Pre
mul_Config8888; |
14 #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) | 13 #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) |
15 const SkCanvas::Config8888 SkBaseDevice::kPMColorAlias = SkCanvas::kRGBA_Pre
mul_Config8888; | 14 const SkCanvas::Config8888 SkBaseDevice::kPMColorAlias = SkCanvas::kRGBA_Pre
mul_Config8888; |
16 #else | 15 #else |
17 const SkCanvas::Config8888 SkBaseDevice::kPMColorAlias = (SkCanvas::Config88
88) -1; | 16 const SkCanvas::Config8888 SkBaseDevice::kPMColorAlias = (SkCanvas::Config88
88) -1; |
18 #endif | 17 #endif |
19 | 18 |
20 /////////////////////////////////////////////////////////////////////////////// | 19 /////////////////////////////////////////////////////////////////////////////// |
| 20 |
21 SkBaseDevice::SkBaseDevice() | 21 SkBaseDevice::SkBaseDevice() |
22 : fLeakyProperties(SkDeviceProperties::MakeDefault()) | 22 : fLeakyProperties(SkDeviceProperties::MakeDefault()) |
23 #ifdef SK_DEBUG | 23 #ifdef SK_DEBUG |
24 , fAttachedToCanvas(false) | 24 , fAttachedToCanvas(false) |
25 #endif | 25 #endif |
26 { | 26 { |
27 fOrigin.setZero(); | 27 fOrigin.setZero(); |
28 fMetaData = NULL; | 28 fMetaData = NULL; |
29 } | 29 } |
30 | 30 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 bool result = this->onReadPixels(bmpSubset, | 109 bool result = this->onReadPixels(bmpSubset, |
110 srcRect.fLeft, | 110 srcRect.fLeft, |
111 srcRect.fTop, | 111 srcRect.fTop, |
112 config8888); | 112 config8888); |
113 if (result && bmp == &tmp) { | 113 if (result && bmp == &tmp) { |
114 tmp.swap(*bitmap); | 114 tmp.swap(*bitmap); |
115 } | 115 } |
116 return result; | 116 return result; |
117 } | 117 } |
| 118 |
| 119 SkSurface* SkBaseDevice::newSurface(const SkImageInfo&) { return NULL; } |
OLD | NEW |