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 class GrTextureAdjuster; |
25 struct GrCachedLayer; | 26 struct GrCachedLayer; |
26 | 27 |
27 /** | 28 /** |
28 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th
e | 29 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th
e |
29 * canvas. | 30 * canvas. |
30 */ | 31 */ |
31 class SK_API SkGpuDevice : public SkBaseDevice { | 32 class SK_API SkGpuDevice : public SkBaseDevice { |
32 public: | 33 public: |
33 enum InitContents { | 34 enum InitContents { |
34 kClear_InitContents, | 35 kClear_InitContents, |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 void drawTiledBitmap(const SkBitmap& bitmap, | 228 void drawTiledBitmap(const SkBitmap& bitmap, |
228 const SkMatrix& viewMatrix, | 229 const SkMatrix& viewMatrix, |
229 const SkRect& srcRect, | 230 const SkRect& srcRect, |
230 const SkIRect& clippedSrcRect, | 231 const SkIRect& clippedSrcRect, |
231 const GrTextureParams& params, | 232 const GrTextureParams& params, |
232 const SkPaint& paint, | 233 const SkPaint& paint, |
233 SkCanvas::SrcRectConstraint, | 234 SkCanvas::SrcRectConstraint, |
234 int tileSize, | 235 int tileSize, |
235 bool bicubic); | 236 bool bicubic); |
236 | 237 |
| 238 void drawTextureRect(GrTextureAdjuster*, |
| 239 bool alphaTexture, |
| 240 const SkRect& srcRect, |
| 241 const SkRect& dstRect, |
| 242 const SkMatrix& viewMatrix, |
| 243 const GrClip& clip, |
| 244 const SkPaint& paint, |
| 245 SkCanvas::SrcRectConstraint constraint); |
| 246 |
| 247 /** The localMatrix should be the transformation from the src rect to the ds
t rect. */ |
| 248 void drawTextureRectPrecomputedLocalMatrix(GrTextureAdjuster*, |
| 249 bool alphaTexture, |
| 250 const SkRect& srcRect, |
| 251 const SkRect& dstRect, |
| 252 const SkMatrix& viewMatrix, |
| 253 const SkMatrix& localMatrix, |
| 254 const GrClip& clip, |
| 255 const SkPaint& paint, |
| 256 SkCanvas::SrcRectConstraint const
raint); |
| 257 |
| 258 |
237 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); | 259 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); |
238 | 260 |
239 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c
onst SkImageInfo&, | 261 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c
onst SkImageInfo&, |
240 int sampleCount); | 262 int sampleCount); |
241 | 263 |
242 friend class GrAtlasTextContext; | 264 friend class GrAtlasTextContext; |
243 friend class SkSurface_Gpu; // for access to surfaceProps | 265 friend class SkSurface_Gpu; // for access to surfaceProps |
244 typedef SkBaseDevice INHERITED; | 266 typedef SkBaseDevice INHERITED; |
245 }; | 267 }; |
246 | 268 |
247 #endif | 269 #endif |
OLD | NEW |