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

Unified Diff: src/gpu/batches/GrAtlasTextBatch.h

Issue 1716443005: Calculate translations to apply to vertices in batch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/batches/GrAtlasTextBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAtlasTextBatch.h
diff --git a/src/gpu/batches/GrAtlasTextBatch.h b/src/gpu/batches/GrAtlasTextBatch.h
index d90aa194c3e7d536cffc36ce8dc11ec3ea3a6093..435fb59d4920279183e5651913047523a78bffa9 100644
--- a/src/gpu/batches/GrAtlasTextBatch.h
+++ b/src/gpu/batches/GrAtlasTextBatch.h
@@ -22,12 +22,13 @@ public:
typedef GrAtlasTextBlob Blob;
struct Geometry {
+ SkMatrix fViewMatrix;
Blob* fBlob;
+ SkScalar fX;
+ SkScalar fY;
int fRun;
int fSubRun;
GrColor fColor;
- SkScalar fTransX;
- SkScalar fTransY;
};
static GrAtlasTextBatch* CreateBitmap(GrMaskFormat maskFormat, int glyphCount,
@@ -79,9 +80,9 @@ public:
void init() {
const Geometry& geo = fGeoData[0];
fBatch.fColor = geo.fColor;
- fBatch.fViewMatrix = geo.fBlob->viewMatrix();
- geo.fBlob->computeSubRunBounds(&fBounds, geo.fRun, geo.fSubRun);
+ geo.fBlob->computeSubRunBounds(&fBounds, geo.fRun, geo.fSubRun, geo.fViewMatrix, geo.fX,
+ geo.fY);
}
const char* name() const override { return "TextBatch"; }
@@ -141,7 +142,7 @@ private:
inline void flush(GrVertexBatch::Target* target, FlushInfo* flushInfo) const;
GrColor color() const { return fBatch.fColor; }
- const SkMatrix& viewMatrix() const { return fBatch.fViewMatrix; }
+ const SkMatrix& viewMatrix() const { return fGeoData[0].fViewMatrix; }
bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; }
int numGlyphs() const { return fBatch.fNumGlyphs; }
@@ -154,7 +155,6 @@ private:
struct BatchTracker {
GrColor fColor;
- SkMatrix fViewMatrix;
bool fUsesLocalCoords;
bool fColorIgnored;
bool fCoverageIgnored;
« no previous file with comments | « no previous file | src/gpu/batches/GrAtlasTextBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698