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

Unified Diff: src/gpu/GrStencilAndCoverTextContext.h

Issue 406523003: Send less transform data when drawing text with nvpr (Closed) Base URL: https://skia.googlesource.com/skia.git@clupload-pathrange
Patch Set: Really fix compiler warnings Created 6 years, 5 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 | « gyp/gmslides.gypi ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStencilAndCoverTextContext.h
diff --git a/src/gpu/GrStencilAndCoverTextContext.h b/src/gpu/GrStencilAndCoverTextContext.h
index 021a84d8760d31d8bebe15c25982cd7e2de3cd56..08d7526b7e390d20e70ef86a75645abad70da2f8 100644
--- a/src/gpu/GrStencilAndCoverTextContext.h
+++ b/src/gpu/GrStencilAndCoverTextContext.h
@@ -10,6 +10,7 @@
#include "GrTextContext.h"
#include "GrDrawState.h"
+#include "GrDrawTarget.h"
#include "SkStrokeRec.h"
class GrTextStrike;
@@ -39,21 +40,29 @@ private:
class GlyphPathRange;
static const int kGlyphBufferSize = 1024;
- void init(const GrPaint&, const SkPaint&, size_t textByteLength);
+ enum DeviceSpaceGlyphsBehavior {
+ kUseIfNeeded_DeviceSpaceGlyphsBehavior,
+ kDoNotUse_DeviceSpaceGlyphsBehavior,
+ };
+ void init(const GrPaint&, const SkPaint&, size_t textByteLength,
+ DeviceSpaceGlyphsBehavior, SkScalar textTranslateY = 0);
void initGlyphs(SkGlyphCache* cache);
+ void appendGlyph(uint16_t glyphID, float x);
void appendGlyph(uint16_t glyphID, float x, float y);
void flush();
void finish();
GrDrawState::AutoRestoreEffects fStateRestore;
SkScalar fTextRatio;
+ float fTextInverseRatio;
SkStrokeRec fStroke;
SkGlyphCache* fGlyphCache;
GlyphPathRange* fGlyphs;
uint32_t fIndexBuffer[kGlyphBufferSize];
- float fTransformBuffer[6 * kGlyphBufferSize];
+ float fTransformBuffer[2 * kGlyphBufferSize];
+ GrDrawTarget::PathTransformType fTransformType;
int fPendingGlyphCount;
- SkMatrix fGlyphTransform;
+ SkMatrix fContextInitialMatrix;
bool fNeedsDeviceSpaceGlyphs;
};
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698