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

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

Issue 334993002: hide virtuals on device for width/height/isopaque (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months 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
« no previous file with comments | « include/core/SkImageInfo.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 * function. 64 * function.
65 */ 65 */
66 SkGpuDevice(GrContext*, GrTexture*, unsigned flags = 0); 66 SkGpuDevice(GrContext*, GrTexture*, unsigned flags = 0);
67 67
68 virtual ~SkGpuDevice(); 68 virtual ~SkGpuDevice();
69 69
70 GrContext* context() const { return fContext; } 70 GrContext* context() const { return fContext; }
71 71
72 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; 72 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE;
73 73
74 // overrides from SkBaseDevice 74 virtual SkImageInfo imageInfo() const SK_OVERRIDE {
75 virtual int width() const SK_OVERRIDE { 75 return fRenderTarget ? fRenderTarget->info() : SkImageInfo::MakeUnknown( );
76 return NULL == fRenderTarget ? 0 : fRenderTarget->width();
77 }
78 virtual int height() const SK_OVERRIDE {
79 return NULL == fRenderTarget ? 0 : fRenderTarget->height();
80 }
81 virtual bool isOpaque() const SK_OVERRIDE {
82 return NULL == fRenderTarget ? false
83 : kRGB_565_GrPixelConfig == fRenderTarget-> config();
84 } 76 }
85 77
86 virtual void clear(SkColor color) SK_OVERRIDE; 78 virtual void clear(SkColor color) SK_OVERRIDE;
87 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; 79 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE;
88 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t, 80 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t,
89 const SkPoint[], const SkPaint& paint) SK_OVERRIDE; 81 const SkPoint[], const SkPaint& paint) SK_OVERRIDE;
90 virtual void drawRect(const SkDraw&, const SkRect& r, 82 virtual void drawRect(const SkDraw&, const SkRect& r,
91 const SkPaint& paint) SK_OVERRIDE; 83 const SkPaint& paint) SK_OVERRIDE;
92 virtual void drawRRect(const SkDraw&, const SkRRect& r, 84 virtual void drawRRect(const SkDraw&, const SkRRect& r,
93 const SkPaint& paint) SK_OVERRIDE; 85 const SkPaint& paint) SK_OVERRIDE;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 bool bicubic); 211 bool bicubic);
220 212
221 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); 213 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint);
222 214
223 static SkPicture::AccelData::Key ComputeAccelDataKey(); 215 static SkPicture::AccelData::Key ComputeAccelDataKey();
224 216
225 typedef SkBitmapDevice INHERITED; 217 typedef SkBitmapDevice INHERITED;
226 }; 218 };
227 219
228 #endif 220 #endif
OLDNEW
« no previous file with comments | « include/core/SkImageInfo.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698