| 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 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 class GrTextContext; | 24 class GrTextContext; |
| 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 }; | 35 }; |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * Creates an SkGpuDevice from a GrSurface. This will fail if the surface is
not a render | 38 * 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, | 39 * 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 | 40 * the kCached_Flag should be specified to make the device responsible for u
nlocking |
| 41 * the surface when it is released. | 41 * the surface when it is released. |
| 42 */ | 42 */ |
| 43 static SkGpuDevice* Create(GrSurface* surface, unsigned flags = 0); | 43 static SkGpuDevice* Create(GrSurface* surface, unsigned flags = 0); |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * New device that will create an offscreen renderTarget based on the | 46 * New device that will create an offscreen renderTarget based on the |
| 47 * ImageInfo and sampleCount. The device's storage will not | 47 * ImageInfo and sampleCount. The device's storage will not |
| 48 * count against the GrContext's texture cache budget. The device's pixels | 48 * count against the GrContext's texture cache budget. The device's pixels |
| 49 * will be uninitialized. On failure, returns NULL. | 49 * will be uninitialized. On failure, returns NULL. |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 SkCanvas::DrawBitmapRectFlags flags, | 225 SkCanvas::DrawBitmapRectFlags flags, |
| 226 int tileSize, | 226 int tileSize, |
| 227 bool bicubic); | 227 bool bicubic); |
| 228 | 228 |
| 229 static SkPicture::AccelData::Key ComputeAccelDataKey(); | 229 static SkPicture::AccelData::Key ComputeAccelDataKey(); |
| 230 | 230 |
| 231 typedef SkBitmapDevice INHERITED; | 231 typedef SkBitmapDevice INHERITED; |
| 232 }; | 232 }; |
| 233 | 233 |
| 234 #endif | 234 #endif |
| OLD | NEW |