| 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 #ifndef SkGpuDevice_DEFINED | 9 #ifndef SkGpuDevice_DEFINED |
| 10 #define SkGpuDevice_DEFINED | 10 #define SkGpuDevice_DEFINED |
| 11 | 11 |
| 12 #include "SkGr.h" | 12 #include "SkGr.h" |
| 13 #include "SkBitmap.h" | 13 #include "SkBitmap.h" |
| 14 #include "SkDevice.h" | 14 #include "SkDevice.h" |
| 15 #include "SkPicture.h" | 15 #include "SkPicture.h" |
| 16 #include "SkRegion.h" | 16 #include "SkRegion.h" |
| 17 #include "SkSurface.h" | 17 #include "SkSurface.h" |
| 18 #include "GrContext.h" | 18 #include "GrContext.h" |
| 19 #include "GrSurfacePriv.h" | 19 #include "GrSurfacePriv.h" |
| 20 | 20 |
| 21 struct SkDrawProcs; | 21 struct SkDrawProcs; |
| 22 struct GrSkDrawProcs; | 22 struct GrSkDrawProcs; |
| 23 | 23 |
| 24 class GrAccelData; | 24 class GrAccelData; |
| 25 struct GrCachedLayer; | 25 struct GrCachedLayer; |
| 26 class GrTextContext; | |
| 27 | 26 |
| 28 /** | 27 /** |
| 29 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th
e | 28 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th
e |
| 30 * canvas. | 29 * canvas. |
| 31 */ | 30 */ |
| 32 class SK_API SkGpuDevice : public SkBaseDevice { | 31 class SK_API SkGpuDevice : public SkBaseDevice { |
| 33 public: | 32 public: |
| 34 enum Flags { | 33 enum Flags { |
| 35 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear | 34 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear |
| 36 }; | 35 }; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 /** PRIVATE / EXPERIMENTAL -- do not call */ | 143 /** PRIVATE / EXPERIMENTAL -- do not call */ |
| 145 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic
ture, | 144 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic
ture, |
| 146 const SkMatrix*, const SkPaint*) overr
ide; | 145 const SkMatrix*, const SkPaint*) overr
ide; |
| 147 | 146 |
| 148 private: | 147 private: |
| 149 GrContext* fContext; | 148 GrContext* fContext; |
| 150 GrSkDrawProcs* fDrawProcs; | 149 GrSkDrawProcs* fDrawProcs; |
| 151 SkAutoTUnref<const SkClipStack> fClipStack; | 150 SkAutoTUnref<const SkClipStack> fClipStack; |
| 152 SkIPoint fClipOrigin; | 151 SkIPoint fClipOrigin; |
| 153 GrClip fClip; | 152 GrClip fClip; |
| 154 GrTextContext* fTextContext; | |
| 155 SkAutoTUnref<GrDrawContext> fDrawContext; | 153 SkAutoTUnref<GrDrawContext> fDrawContext; |
| 156 SkSurfaceProps fSurfaceProps; | 154 SkSurfaceProps fSurfaceProps; |
| 157 GrRenderTarget* fRenderTarget; | 155 GrRenderTarget* fRenderTarget; |
| 158 // remove when our clients don't rely on accessBitmap() | 156 // remove when our clients don't rely on accessBitmap() |
| 159 SkBitmap fLegacyBitmap; | 157 SkBitmap fLegacyBitmap; |
| 160 bool fNeedClear; | 158 bool fNeedClear; |
| 161 | 159 |
| 162 SkGpuDevice(GrRenderTarget*, int width, int height, const SkSurfaceProps*, u
nsigned flags); | 160 SkGpuDevice(GrRenderTarget*, int width, int height, const SkSurfaceProps*, u
nsigned flags); |
| 163 | 161 |
| 164 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; | 162 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 SkCanvas::DrawBitmapRectFlags flags, | 210 SkCanvas::DrawBitmapRectFlags flags, |
| 213 int tileSize, | 211 int tileSize, |
| 214 bool bicubic); | 212 bool bicubic); |
| 215 | 213 |
| 216 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); | 214 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); |
| 217 | 215 |
| 218 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c
onst SkImageInfo&, | 216 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c
onst SkImageInfo&, |
| 219 int sampleCount); | 217 int sampleCount); |
| 220 | 218 |
| 221 friend class GrAtlasTextContext; | 219 friend class GrAtlasTextContext; |
| 222 friend class GrTextContext; | |
| 223 typedef SkBaseDevice INHERITED; | 220 typedef SkBaseDevice INHERITED; |
| 224 }; | 221 }; |
| 225 | 222 |
| 226 #endif | 223 #endif |
| OLD | NEW |