| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 const SkMatrix& viewMatrix) const; | 218 const SkMatrix& viewMatrix) const; |
| 218 | 219 |
| 219 void internalDrawBitmap(const SkBitmap&, | 220 void internalDrawBitmap(const SkBitmap&, |
| 220 const SkMatrix& viewMatrix, | 221 const SkMatrix& viewMatrix, |
| 221 const SkRect&, | 222 const SkRect&, |
| 222 const GrTextureParams& params, | 223 const GrTextureParams& params, |
| 223 const SkPaint& paint, | 224 const SkPaint& paint, |
| 224 SkCanvas::SrcRectConstraint, | 225 SkCanvas::SrcRectConstraint, |
| 225 bool bicubic, | 226 bool bicubic, |
| 226 bool needsTextureDomain); | 227 bool needsTextureDomain); |
| 228 |
| 227 void drawTiledBitmap(const SkBitmap& bitmap, | 229 void drawTiledBitmap(const SkBitmap& bitmap, |
| 228 const SkMatrix& viewMatrix, | 230 const SkMatrix& viewMatrix, |
| 229 const SkRect& srcRect, | 231 const SkRect& srcRect, |
| 230 const SkIRect& clippedSrcRect, | 232 const SkIRect& clippedSrcRect, |
| 231 const GrTextureParams& params, | 233 const GrTextureParams& params, |
| 232 const SkPaint& paint, | 234 const SkPaint& paint, |
| 233 SkCanvas::SrcRectConstraint, | 235 SkCanvas::SrcRectConstraint, |
| 234 int tileSize, | 236 int tileSize, |
| 235 bool bicubic); | 237 bool bicubic); |
| 236 | 238 |
| 239 void drawTextureAdjuster(GrTextureAdjuster* adjuster, |
| 240 bool alphaOnly, |
| 241 const SkRect* srcRect, |
| 242 const SkRect* dstRect, |
| 243 SkCanvas::SrcRectConstraint constraint, |
| 244 const SkMatrix& viewMatrix, |
| 245 const GrClip& clip, |
| 246 const SkPaint& paint); |
| 247 |
| 248 void drawTextureAdjusterImpl(GrTextureAdjuster*, |
| 249 bool alphaOnly, |
| 250 const SkRect& clippedSrcRect, |
| 251 const SkRect& clippedDstRect, |
| 252 SkCanvas::SrcRectConstraint constraint, |
| 253 const SkMatrix& viewMatrix, |
| 254 const SkMatrix& srcToDstMatrix, |
| 255 const GrClip& clip, |
| 256 const SkPaint& paint); |
| 257 |
| 237 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); | 258 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); |
| 238 | 259 |
| 239 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c
onst SkImageInfo&, | 260 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c
onst SkImageInfo&, |
| 240 int sampleCount); | 261 int sampleCount); |
| 241 | 262 |
| 242 friend class GrAtlasTextContext; | 263 friend class GrAtlasTextContext; |
| 243 friend class SkSurface_Gpu; // for access to surfaceProps | 264 friend class SkSurface_Gpu; // for access to surfaceProps |
| 244 typedef SkBaseDevice INHERITED; | 265 typedef SkBaseDevice INHERITED; |
| 245 }; | 266 }; |
| 246 | 267 |
| 247 #endif | 268 #endif |
| OLD | NEW |