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

Unified Diff: src/gpu/GrTextContext.cpp

Issue 808703006: remove view matrix from context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: one more fix Created 6 years 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 | « src/gpu/GrTextContext.h ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextContext.cpp
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index 259ba184aaa6f6c6762416c1bce096e894416219..e62136507c4ea039561adcaeed63523b51b27e69 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -41,13 +41,14 @@ void GrTextContext::init(const GrPaint& grPaint, const SkPaint& skPaint) {
}
bool GrTextContext::drawText(const GrPaint& paint, const SkPaint& skPaint,
+ const SkMatrix& viewMatrix,
const char text[], size_t byteLength,
SkScalar x, SkScalar y) {
GrTextContext* textContext = this;
do {
- if (textContext->canDraw(skPaint)) {
- textContext->onDrawText(paint, skPaint, text, byteLength, x, y);
+ if (textContext->canDraw(skPaint, viewMatrix)) {
+ textContext->onDrawText(paint, skPaint, viewMatrix, text, byteLength, x, y);
return true;
}
textContext = textContext->fFallbackTextContext;
@@ -57,15 +58,16 @@ bool GrTextContext::drawText(const GrPaint& paint, const SkPaint& skPaint,
}
bool GrTextContext::drawPosText(const GrPaint& paint, const SkPaint& skPaint,
+ const SkMatrix& viewMatrix,
const char text[], size_t byteLength,
const SkScalar pos[], int scalarsPerPosition,
const SkPoint& offset) {
GrTextContext* textContext = this;
do {
- if (textContext->canDraw(skPaint)) {
- textContext->onDrawPosText(paint, skPaint, text, byteLength, pos, scalarsPerPosition,
- offset);
+ if (textContext->canDraw(skPaint, viewMatrix)) {
+ textContext->onDrawPosText(paint, skPaint, viewMatrix, text, byteLength, pos,
+ scalarsPerPosition, offset);
return true;
}
textContext = textContext->fFallbackTextContext;
« no previous file with comments | « src/gpu/GrTextContext.h ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698