| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkGpuDevice_DEFINED | 8 #ifndef SkGpuDevice_DEFINED |
| 9 #define SkGpuDevice_DEFINED | 9 #define SkGpuDevice_DEFINED |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 GrContext* context() const override { return fContext; } | 60 GrContext* context() const override { return fContext; } |
| 61 | 61 |
| 62 // set all pixels to 0 | 62 // set all pixels to 0 |
| 63 void clearAll(); | 63 void clearAll(); |
| 64 | 64 |
| 65 void replaceDrawContext(bool shouldRetainContent); | 65 void replaceDrawContext(bool shouldRetainContent); |
| 66 | 66 |
| 67 GrDrawContext* accessDrawContext() override; | 67 GrDrawContext* accessDrawContext() override; |
| 68 | 68 |
| 69 SkImageInfo imageInfo() const override { | |
| 70 SkColorType colorType; | |
| 71 if (!GrPixelConfigToColorType(fDrawContext->config(), &colorType)) { | |
| 72 colorType = kUnknown_SkColorType; | |
| 73 } | |
| 74 return SkImageInfo::Make(fSize.fWidth, fSize.fHeight, colorType, | |
| 75 fOpaque ? kOpaque_SkAlphaType : kPremul_SkAlpha
Type, | |
| 76 sk_ref_sp(fDrawContext->getColorSpace())); | |
| 77 } | |
| 78 | |
| 79 void drawPaint(const SkDraw&, const SkPaint& paint) override; | 69 void drawPaint(const SkDraw&, const SkPaint& paint) override; |
| 80 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 70 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, |
| 81 const SkPoint[], const SkPaint& paint) override; | 71 const SkPoint[], const SkPaint& paint) override; |
| 82 virtual void drawRect(const SkDraw&, const SkRect& r, | 72 virtual void drawRect(const SkDraw&, const SkRect& r, |
| 83 const SkPaint& paint) override; | 73 const SkPaint& paint) override; |
| 84 virtual void drawRRect(const SkDraw&, const SkRRect& r, | 74 virtual void drawRRect(const SkDraw&, const SkRRect& r, |
| 85 const SkPaint& paint) override; | 75 const SkPaint& paint) override; |
| 86 virtual void drawDRRect(const SkDraw& draw, const SkRRect& outer, | 76 virtual void drawDRRect(const SkDraw& draw, const SkRRect& outer, |
| 87 const SkRRect& inner, const SkPaint& paint) override
; | 77 const SkRRect& inner, const SkPaint& paint) override
; |
| 88 virtual void drawOval(const SkDraw&, const SkRect& oval, | 78 virtual void drawOval(const SkDraw&, const SkRect& oval, |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 int sampleCount, | 250 int sampleCount, |
| 261 GrSurfaceOrigin, | 251 GrSurfaceOrigin, |
| 262 const SkSurfaceProps*); | 252 const SkSurfaceProps*); |
| 263 | 253 |
| 264 friend class GrAtlasTextContext; | 254 friend class GrAtlasTextContext; |
| 265 friend class SkSurface_Gpu; // for access to surfaceProps | 255 friend class SkSurface_Gpu; // for access to surfaceProps |
| 266 typedef SkBaseDevice INHERITED; | 256 typedef SkBaseDevice INHERITED; |
| 267 }; | 257 }; |
| 268 | 258 |
| 269 #endif | 259 #endif |
| OLD | NEW |