diff options
author | robertphillips <robertphillips@google.com> | 2015-06-22 09:46:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-22 09:46:59 -0700 |
commit | 9a53fd7c41554630124522f4b6eedc16912abbb7 (patch) | |
tree | 20550e4369717dfa1082ba4913a4dc646d040b5e /tests/LayerDrawLooperTest.cpp | |
parent | 462a33c7ac6ad82ac3511884d6448491e9e9a647 (diff) |
Begin kLegacyFontHost_InitType cleanup
This CL starts the process of pushing kLegacyFontHost_InitType-type SkSurfaceProps up the call stack and out of Skia. It:
Gets rid of the default SkBaseDevice ctor. This means everyone has to always hand an explicit SkSurfaceProps to it.
It makes public the SkBitmapDevice creation methods that require SkSurfaceProps.
Removes (in Skia's code base) all SkBitmapDevice ctor calls w/o SkSurfaceProps.
Makes the "recording" canvases (e.g., pdf, svg, xps) explicitly not use kLegacyFontHost_InitType.
Replicates the creating canvas/device's flags on saveLayer devices
BUG=skia:3934
Review URL: https://codereview.chromium.org/1204433002
Diffstat (limited to 'tests/LayerDrawLooperTest.cpp')
-rw-r--r-- | tests/LayerDrawLooperTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/LayerDrawLooperTest.cpp b/tests/LayerDrawLooperTest.cpp index 2c9b525aa2..391db7ce7f 100644 --- a/tests/LayerDrawLooperTest.cpp +++ b/tests/LayerDrawLooperTest.cpp @@ -25,12 +25,13 @@ static SkBitmap make_bm(int w, int h) { return bm; } +// TODO: can this be derived from SkBaseDevice? class FakeDevice : public SkBitmapDevice { public: - FakeDevice() : SkBitmapDevice(make_bm(100, 100)) { } + FakeDevice() : INHERITED(make_bm(100, 100), SkSurfaceProps(0, kUnknown_SkPixelGeometry)) { + } - virtual void drawRect(const SkDraw& draw, const SkRect& r, - const SkPaint& paint) override { + void drawRect(const SkDraw& draw, const SkRect& r, const SkPaint& paint) override { fLastMatrix = *draw.fMatrix; this->INHERITED::drawRect(draw, r, paint); } |