Chromium Code Reviews| 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 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 void clearAll(); | 69 void clearAll(); |
| 70 | 70 |
| 71 void replaceRenderTarget(bool shouldRetainContent); | 71 void replaceRenderTarget(bool shouldRetainContent); |
| 72 | 72 |
| 73 GrRenderTarget* accessRenderTarget() override; | 73 GrRenderTarget* accessRenderTarget() override; |
| 74 | 74 |
| 75 SkImageInfo imageInfo() const override { | 75 SkImageInfo imageInfo() const override { |
| 76 return fLegacyBitmap.info(); | 76 return fLegacyBitmap.info(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } | 79 const SkSurfaceProps& surfaceProps() const { |
| 80 return this->getLeakyProperties(); | |
|
bungeman-skia
2015/06/19 17:35:34
Does this make sense? The leaky properties are tho
bungeman-skia
2015/06/19 18:27:30
Ah, so no one is using the leaky properties.
robertphillips
2015/06/19 18:27:47
As discussed in person I will follow up this CL wi
| |
| 81 } | |
| 80 | 82 |
| 81 void drawPaint(const SkDraw&, const SkPaint& paint) override; | 83 void drawPaint(const SkDraw&, const SkPaint& paint) override; |
| 82 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t, | 84 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t, |
| 83 const SkPoint[], const SkPaint& paint) override; | 85 const SkPoint[], const SkPaint& paint) override; |
| 84 virtual void drawRect(const SkDraw&, const SkRect& r, | 86 virtual void drawRect(const SkDraw&, const SkRect& r, |
| 85 const SkPaint& paint) override; | 87 const SkPaint& paint) override; |
| 86 virtual void drawRRect(const SkDraw&, const SkRRect& r, | 88 virtual void drawRRect(const SkDraw&, const SkRRect& r, |
| 87 const SkPaint& paint) override; | 89 const SkPaint& paint) override; |
| 88 virtual void drawDRRect(const SkDraw& draw, const SkRRect& outer, | 90 virtual void drawDRRect(const SkDraw& draw, const SkRRect& outer, |
| 89 const SkRRect& inner, const SkPaint& paint) override ; | 91 const SkRRect& inner, const SkPaint& paint) override ; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic ture, | 146 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic ture, |
| 145 const SkMatrix*, const SkPaint*) overr ide; | 147 const SkMatrix*, const SkPaint*) overr ide; |
| 146 | 148 |
| 147 private: | 149 private: |
| 148 GrContext* fContext; | 150 GrContext* fContext; |
| 149 GrSkDrawProcs* fDrawProcs; | 151 GrSkDrawProcs* fDrawProcs; |
| 150 SkAutoTUnref<const SkClipStack> fClipStack; | 152 SkAutoTUnref<const SkClipStack> fClipStack; |
| 151 SkIPoint fClipOrigin; | 153 SkIPoint fClipOrigin; |
| 152 GrClip fClip; | 154 GrClip fClip; |
| 153 SkAutoTUnref<GrDrawContext> fDrawContext; | 155 SkAutoTUnref<GrDrawContext> fDrawContext; |
| 154 SkSurfaceProps fSurfaceProps; | |
| 155 GrRenderTarget* fRenderTarget; | 156 GrRenderTarget* fRenderTarget; |
| 156 // remove when our clients don't rely on accessBitmap() | 157 // remove when our clients don't rely on accessBitmap() |
| 157 SkBitmap fLegacyBitmap; | 158 SkBitmap fLegacyBitmap; |
| 158 bool fNeedClear; | 159 bool fNeedClear; |
| 159 | 160 |
| 160 SkGpuDevice(GrRenderTarget*, int width, int height, const SkSurfaceProps*, u nsigned flags); | 161 SkGpuDevice(GrRenderTarget*, int width, int height, const SkSurfaceProps*, u nsigned flags); |
| 161 | 162 |
| 162 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; | 163 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; |
| 163 | 164 |
| 164 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override; | 165 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); | 215 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); |
| 215 | 216 |
| 216 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c onst SkImageInfo&, | 217 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c onst SkImageInfo&, |
| 217 int sampleCount); | 218 int sampleCount); |
| 218 | 219 |
| 219 friend class GrAtlasTextContext; | 220 friend class GrAtlasTextContext; |
| 220 typedef SkBaseDevice INHERITED; | 221 typedef SkBaseDevice INHERITED; |
| 221 }; | 222 }; |
| 222 | 223 |
| 223 #endif | 224 #endif |
| OLD | NEW |