Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: src/gpu/SkGpuDevice.h

Issue 772533004: Change clear() to respect the clip (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix SkRecordPartialDraw Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 9
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { 59 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) {
60 SkBaseDevice* dev = this->onCreateCompatibleDevice(CreateInfo(this->imag eInfo(), 60 SkBaseDevice* dev = this->onCreateCompatibleDevice(CreateInfo(this->imag eInfo(),
61 kGeneral_U sage, 61 kGeneral_U sage,
62 props.pixe lGeometry())); 62 props.pixe lGeometry()));
63 return static_cast<SkGpuDevice*>(dev); 63 return static_cast<SkGpuDevice*>(dev);
64 } 64 }
65 65
66 GrContext* context() const { return fContext; } 66 GrContext* context() const { return fContext; }
67 67
68 // set all pixels to 0
69 void clearAll();
70
68 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; 71 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE;
69 72
70 virtual SkImageInfo imageInfo() const SK_OVERRIDE { 73 virtual SkImageInfo imageInfo() const SK_OVERRIDE {
71 return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo ::MakeUnknown(); 74 return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo ::MakeUnknown();
72 } 75 }
73 76
74 virtual void clear(SkColor color) SK_OVERRIDE;
75 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; 77 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE;
76 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t, 78 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t,
77 const SkPoint[], const SkPaint& paint) SK_OVERRIDE; 79 const SkPoint[], const SkPaint& paint) SK_OVERRIDE;
78 virtual void drawRect(const SkDraw&, const SkRect& r, 80 virtual void drawRect(const SkDraw&, const SkRect& r,
79 const SkPaint& paint) SK_OVERRIDE; 81 const SkPaint& paint) SK_OVERRIDE;
80 virtual void drawRRect(const SkDraw&, const SkRRect& r, 82 virtual void drawRRect(const SkDraw&, const SkRRect& r,
81 const SkPaint& paint) SK_OVERRIDE; 83 const SkPaint& paint) SK_OVERRIDE;
82 virtual void drawDRRect(const SkDraw& draw, const SkRRect& outer, 84 virtual void drawDRRect(const SkDraw& draw, const SkRRect& outer,
83 const SkRRect& inner, const SkPaint& paint) SK_OVERR IDE; 85 const SkRRect& inner, const SkPaint& paint) SK_OVERR IDE;
84 virtual void drawOval(const SkDraw&, const SkRect& oval, 86 virtual void drawOval(const SkDraw&, const SkRect& oval,
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 bool filterTexture(GrContext*, GrTexture*, const SkImageFilter*, 207 bool filterTexture(GrContext*, GrTexture*, const SkImageFilter*,
206 const SkImageFilter::Context&, 208 const SkImageFilter::Context&,
207 SkBitmap* result, SkIPoint* offset); 209 SkBitmap* result, SkIPoint* offset);
208 210
209 static SkPicture::AccelData::Key ComputeAccelDataKey(); 211 static SkPicture::AccelData::Key ComputeAccelDataKey();
210 212
211 typedef SkBaseDevice INHERITED; 213 typedef SkBaseDevice INHERITED;
212 }; 214 };
213 215
214 #endif 216 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698