aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRemoteGlyphCache.h
diff options
context:
space:
mode:
authorGravatar Khushal <khushalsagar@chromium.org>2018-06-08 13:00:40 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-08 20:34:23 +0000
commita05a31aef4a0dc1af797aa454a2864a36260956b (patch)
tree45a603ab125bdb4bc41bd2444990bdd314d66092 /src/core/SkRemoteGlyphCache.h
parentbfe4db5c79cab60d18734a20bead4eae245a9264 (diff)
fonts: Perform blob analysis at SkBaseDevice layer instead of canvas.
Currently we use the onDrawTextBlob hook to analyze the text blob, which requires replicating the logic for applying the SkDrawLooper and misses the optimization for skipping ops outside the current clip. Avoid this by using SkBaseDevice::drawTextBlob instead to ensure we re-use all the SkCanvas code until the device level. R=herb@google.com Bug: 829622 Change-Id: I2721c02541d337e2fb3744132e85758f7c804841 Reviewed-on: https://skia-review.googlesource.com/133101 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkRemoteGlyphCache.h')
-rw-r--r--src/core/SkRemoteGlyphCache.h24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/core/SkRemoteGlyphCache.h b/src/core/SkRemoteGlyphCache.h
index 2772de67cb..ce318489e4 100644
--- a/src/core/SkRemoteGlyphCache.h
+++ b/src/core/SkRemoteGlyphCache.h
@@ -62,6 +62,10 @@ public:
int fMaxTextureSize = 0;
size_t fMaxTextureBytes = 0u;
};
+ SkTextBlobCacheDiffCanvas(int width, int height, const SkSurfaceProps& props,
+ SkStrikeServer* strikeserver, Settings settings = Settings());
+
+ // TODO(khushalsagar): Remove once removed from chromium.
SkTextBlobCacheDiffCanvas(int width, int height, const SkMatrix& deviceMatrix,
const SkSurfaceProps& props, SkStrikeServer* strikeserver,
Settings settings = Settings());
@@ -69,29 +73,11 @@ public:
protected:
SkCanvas::SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec& rec) override;
-
void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
const SkPaint& paint) override;
private:
- void processLooper(const SkPoint& position,
- const SkTextBlobRunIterator& it,
- const SkPaint& origPaint,
- SkDrawLooper* looper);
- void processGlyphRun(const SkPoint& position,
- const SkTextBlobRunIterator& it,
- const SkPaint& runPaint);
- void processGlyphRunForPaths(const SkTextBlobRunIterator& it, const SkPaint& runPaint,
- const SkMatrix& runMatrix);
-#if SK_SUPPORT_GPU
- bool processGlyphRunForDFT(const SkTextBlobRunIterator& it, const SkPaint& runPaint,
- const SkMatrix& runMatrix);
-#endif
- const SkSurfaceProps& surfaceProps() const;
-
- const SkMatrix fDeviceMatrix;
- SkStrikeServer* const fStrikeServer;
- const Settings fSettings;
+ class TrackLayerDevice;
};
using SkDiscardableHandleId = uint32_t;