diff options
author | Herb Derby <herb@google.com> | 2018-04-06 16:49:57 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-06 22:12:24 +0000 |
commit | 30a9d260e840f3cafdc8d2266d5ac5b6bbddaf78 (patch) | |
tree | e1e80a64fe65006fd6fe2aab83b67800f4a9071b /src | |
parent | 1c6098d4b7d9e168ab85d73eebd8b3e5d293a8cd (diff) |
Better layer tracking fidelity
Track layer processing more faithfully.
This temporary until we can remove the old
system for dissabling the unneeded system
for falling back to A8 format.
BUG=skia:7786
Change-Id: Iee9154f4209c4020f16b04edd03e42c6b7d0ec98
Reviewed-on: https://skia-review.googlesource.com/119104
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkRemoteGlyphCache.cpp | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/src/core/SkRemoteGlyphCache.cpp b/src/core/SkRemoteGlyphCache.cpp index 7ee9d504fb..3d925c49d3 100644 --- a/src/core/SkRemoteGlyphCache.cpp +++ b/src/core/SkRemoteGlyphCache.cpp @@ -127,16 +127,6 @@ private: size_t fCursor{0}; }; -// -- TrackLayerDevice ----------------------------------------------------------------------------- -class TrackLayerDevice : public SkNoPixelsDevice { -public: - TrackLayerDevice(const SkIRect& bounds, const SkSurfaceProps& props) - : SkNoPixelsDevice(bounds, props) { } - SkBaseDevice* onCreateDevice(const CreateInfo& cinfo, const SkPaint*) override { - const SkSurfaceProps surfaceProps(this->surfaceProps().flags(), cinfo.fPixelGeometry); - return new TrackLayerDevice(this->getGlobalBounds(), surfaceProps); - } -}; // -- SkStrikeCacheDifferenceSpec ------------------------------------------------------------------ @@ -179,6 +169,29 @@ void SkStrikeCacheDifferenceSpec::iterateDifferences(PerStrike perStrike, PerGly } } +// -- TrackLayerDevice ----------------------------------------------------------------------------- +class TrackLayerDevice : public SkNoPixelsDevice { +public: + TrackLayerDevice(const SkIRect& bounds, const SkSurfaceProps& props) + : SkNoPixelsDevice(bounds, props) { } + SkBaseDevice* onCreateDevice(const CreateInfo& cinfo, const SkPaint*) override { + const SkSurfaceProps surfaceProps(this->surfaceProps().flags(), cinfo.fPixelGeometry); + return new TrackLayerDevice(this->getGlobalBounds(), surfaceProps); + } + + // Stolen from the SkBitmapDevice, but the SkGPUDevice is similar. + bool onShouldDisableLCD(const SkPaint& paint) const override { + if (paint.getPathEffect() || + paint.isFakeBoldText() || + paint.getStyle() != SkPaint::kFill_Style || + !paint.isSrcOver()) + { + return true; + } + return false; + } +}; + // -- SkTextBlobCacheDiffCanvas ------------------------------------------------------------------- SkTextBlobCacheDiffCanvas::SkTextBlobCacheDiffCanvas( int width, int height, |