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

Side by Side Diff: include/core/SkBitmapDevice.h

Issue 2261003003: store info in basedevice, change getter to non-virtual const& (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | include/core/SkDevice.h » ('j') | include/core/SkDevice.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 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 SkBitmapDevice_DEFINED 9 #ifndef SkBitmapDevice_DEFINED
10 #define SkBitmapDevice_DEFINED 10 #define SkBitmapDevice_DEFINED
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 /** 52 /**
53 * Construct a new device with the specified bitmap as its backend. It is 53 * Construct a new device with the specified bitmap as its backend. It is
54 * valid for the bitmap to have no pixels associated with it. In that case, 54 * valid for the bitmap to have no pixels associated with it. In that case,
55 * any drawing to this device will have no effect. 55 * any drawing to this device will have no effect.
56 */ 56 */
57 SkBitmapDevice(const SkBitmap& bitmap, const SkSurfaceProps& surfaceProps); 57 SkBitmapDevice(const SkBitmap& bitmap, const SkSurfaceProps& surfaceProps);
58 58
59 static SkBitmapDevice* Create(const SkImageInfo&, const SkSurfaceProps&); 59 static SkBitmapDevice* Create(const SkImageInfo&, const SkSurfaceProps&);
60 60
61 SkImageInfo imageInfo() const override;
62
63 protected: 61 protected:
64 bool onShouldDisableLCD(const SkPaint&) const override; 62 bool onShouldDisableLCD(const SkPaint&) const override;
65 63
66 /** These are called inside the per-device-layer loop for each draw call. 64 /** These are called inside the per-device-layer loop for each draw call.
67 When these are called, we have already applied any saveLayer operations, 65 When these are called, we have already applied any saveLayer operations,
68 and are handling any looping from the paint, and any effects from the 66 and are handling any looping from the paint, and any effects from the
69 DrawFilter. 67 DrawFilter.
70 */ 68 */
71 void drawPaint(const SkDraw&, const SkPaint& paint) override; 69 void drawPaint(const SkDraw&, const SkPaint& paint) override;
72 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,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 SkImageFilterCache* getImageFilterCache() override; 172 SkImageFilterCache* getImageFilterCache() override;
175 173
176 SkBitmap fBitmap; 174 SkBitmap fBitmap;
177 175
178 void setNewSize(const SkISize&); // Used by SkCanvas for resetForNextPictur e(). 176 void setNewSize(const SkISize&); // Used by SkCanvas for resetForNextPictur e().
179 177
180 typedef SkBaseDevice INHERITED; 178 typedef SkBaseDevice INHERITED;
181 }; 179 };
182 180
183 #endif // SkBitmapDevice_DEFINED 181 #endif // SkBitmapDevice_DEFINED
OLDNEW
« no previous file with comments | « no previous file | include/core/SkDevice.h » ('j') | include/core/SkDevice.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698