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

Unified Diff: src/gpu/GrAtlasTextContext.h

Issue 1062863002: Avoid regenerating cached textblobs on integer scrolls (Closed) Base URL: https://skia.googlesource.com/skia.git@atlastextcache
Patch Set: tweak Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.h
diff --git a/src/gpu/GrAtlasTextContext.h b/src/gpu/GrAtlasTextContext.h
index 8fa6bb5d4a577f4275cfa7fdf169e08c1ca572ea..7859c04e23cb5e6bf530d640e996488245d6e859 100644
--- a/src/gpu/GrAtlasTextContext.h
+++ b/src/gpu/GrAtlasTextContext.h
@@ -123,8 +123,12 @@ private:
int fVx;
int fVy;
};
-
+#ifdef SK_DEBUG
+ mutable SkScalar fTotalXError;
+ mutable SkScalar fTotalYError;
+#endif
SkTArray<BigGlyph> fBigGlyphs;
+ GrColor fColor; // the original color on the paint
SkMatrix fViewMatrix;
SkScalar fX;
SkScalar fY;
@@ -171,14 +175,15 @@ private:
const SkMatrix& viewMatrix, const SkIRect& clipBounds, SkScalar x,
SkScalar y);
inline void flushRun(GrDrawTarget*, GrPipelineBuilder*, BitmapTextBlob*, int run, GrColor,
- uint8_t paintAlpha);
+ uint8_t paintAlpha, SkScalar transX, SkScalar transY);
inline void flushBigGlyphs(BitmapTextBlob* cacheBlob, GrRenderTarget* rt,
- const GrPaint& grPaint, const GrClip& clip);
+ const GrPaint& grPaint, const GrClip& clip,
+ SkScalar transX, SkScalar transY);
// We have to flush SkTextBlobs differently from drawText / drawPosText
void flush(GrDrawTarget*, const SkTextBlob*, BitmapTextBlob*, GrRenderTarget*, const SkPaint&,
const GrPaint&, SkDrawFilter*, const GrClip&, const SkMatrix& viewMatrix,
- const SkIRect& clipBounds, SkScalar x, SkScalar y);
+ const SkIRect& clipBounds, SkScalar x, SkScalar y, SkScalar transX, SkScalar transY);
void flush(GrDrawTarget*, BitmapTextBlob*, GrRenderTarget*, const SkPaint&,
const GrPaint&, const GrClip&, const SkMatrix& viewMatrix);
@@ -193,7 +198,8 @@ private:
// sets up the descriptor on the blob and returns a detached cache. Client must attach
inline SkGlyphCache* setupCache(Run*, const SkPaint&, const SkMatrix& viewMatrix);
- static inline bool MustRegenerateBlob(const BitmapTextBlob&, const SkPaint&,
+ static inline bool MustRegenerateBlob(SkScalar* outTransX, SkScalar* outTransY,
+ const BitmapTextBlob&, const SkPaint&,
const SkMatrix& viewMatrix, SkScalar x, SkScalar y);
void regenerateTextBlob(BitmapTextBlob* bmp, const SkPaint& skPaint, const SkMatrix& viewMatrix,
const SkTextBlob* blob, SkScalar x, SkScalar y,
« no previous file with comments | « no previous file | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698