| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * Subclass of SkBitmapDevice, which directs all drawing to the GrGpu owned by
the | 27 * Subclass of SkBitmapDevice, which directs all drawing to the GrGpu owned by
the |
| 28 * canvas. | 28 * canvas. |
| 29 */ | 29 */ |
| 30 class SK_API SkGpuDevice : public SkBitmapDevice { | 30 class SK_API SkGpuDevice : public SkBitmapDevice { |
| 31 public: | 31 public: |
| 32 enum Flags { | 32 enum Flags { |
| 33 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear | 33 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear |
| 34 kCached_Flag = 1 << 1, //!< Surface is cached and needs to be unlock
ed when released | 34 kCached_Flag = 1 << 1, //!< Surface is cached and needs to be unlock
ed when released |
| 35 kDFFonts_Flag = 1 << 2, //!< Surface should render fonts using signed
distance fields |
| 35 }; | 36 }; |
| 36 | 37 |
| 37 /** | 38 /** |
| 38 * Creates an SkGpuDevice from a GrSurface. This will fail if the surface is
not a render | 39 * Creates an SkGpuDevice from a GrSurface. This will fail if the surface is
not a render |
| 39 * target. The caller owns a ref on the returned device. If the surface is c
ached, | 40 * target. The caller owns a ref on the returned device. If the surface is c
ached, |
| 40 * the kCached_Flag should be specified to make the device responsible for u
nlocking | 41 * the kCached_Flag should be specified to make the device responsible for u
nlocking |
| 41 * the surface when it is released. | 42 * the surface when it is released. |
| 42 */ | 43 */ |
| 43 static SkGpuDevice* Create(GrSurface* surface, unsigned flags = 0); | 44 static SkGpuDevice* Create(GrSurface* surface, unsigned flags = 0); |
| 44 | 45 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 SkCanvas::DrawBitmapRectFlags flags, | 217 SkCanvas::DrawBitmapRectFlags flags, |
| 217 int tileSize, | 218 int tileSize, |
| 218 bool bicubic); | 219 bool bicubic); |
| 219 | 220 |
| 220 static SkPicture::AccelData::Key ComputeAccelDataKey(); | 221 static SkPicture::AccelData::Key ComputeAccelDataKey(); |
| 221 | 222 |
| 222 typedef SkBitmapDevice INHERITED; | 223 typedef SkBitmapDevice INHERITED; |
| 223 }; | 224 }; |
| 224 | 225 |
| 225 #endif | 226 #endif |
| OLD | NEW |