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

Unified Diff: src/gpu/GrAtlasTextContext.cpp

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fixing incorrect rebase. Created 5 years, 3 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
Index: src/gpu/GrAtlasTextContext.cpp
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index 81cc6471f75462853bcec731ebe6f00bac63883f..e5d9ca871181184c681b3bc9d6aaf2f713743c97 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -486,7 +486,7 @@ void GrAtlasTextContext::regenerateTextBlob(GrAtlasTextBlob* cacheBlob,
const SkTextBlob* blob, SkScalar x, SkScalar y,
SkDrawFilter* drawFilter, const SkIRect& clipRect,
GrRenderTarget* rt, const GrClip& clip) {
- // The color here is the GrPaint color, and it is used to determine whether we
+ // The color here is the GrPaint color, and it is used to determine whether we
// have to regenerate LCD text blobs.
// We use this color vs the SkPaint color because it has the colorfilter applied.
cacheBlob->fPaintColor = color;
@@ -724,7 +724,7 @@ GrAtlasTextContext::createDrawTextBlob(GrRenderTarget* rt, const GrClip& clip,
byteLength, x, y, clipRect, textRatio, &fallbackTxt, &fallbackPos,
&offset, skPaint);
if (fallbackTxt.count()) {
- this->fallbackDrawPosText(blob, 0, rt, clip, paint.getColor(), skPaint, viewMatrix,
+ this->fallbackDrawPosText(blob, 0, rt, clip, paint.getColor(), skPaint, viewMatrix,
fallbackTxt, fallbackPos, 2, offset, clipRect);
}
} else {
@@ -763,8 +763,8 @@ GrAtlasTextContext::createDrawPosTextBlob(GrRenderTarget* rt, const GrClip& clip
byteLength, pos, scalarsPerPosition, offset, clipRect,
textRatio, &fallbackTxt, &fallbackPos);
if (fallbackTxt.count()) {
- this->fallbackDrawPosText(blob, 0, rt, clip, paint.getColor(), skPaint, viewMatrix,
- fallbackTxt, fallbackPos, scalarsPerPosition, offset,
+ this->fallbackDrawPosText(blob, 0, rt, clip, paint.getColor(), skPaint, viewMatrix,
+ fallbackTxt, fallbackPos, scalarsPerPosition, offset,
clipRect);
}
} else {
@@ -779,7 +779,7 @@ GrAtlasTextContext::createDrawPosTextBlob(GrRenderTarget* rt, const GrClip& clip
}
void GrAtlasTextContext::onDrawText(GrDrawContext* dc, GrRenderTarget* rt,
- const GrClip& clip,
+ const GrClip& clip,
const GrPaint& paint, const SkPaint& skPaint,
const SkMatrix& viewMatrix,
const char text[], size_t byteLength,
@@ -2050,7 +2050,7 @@ private:
};
void GrAtlasTextContext::flushRunAsPaths(GrDrawContext* dc, GrRenderTarget* rt,
- const SkTextBlob::RunIterator& it,
+ const SkTextBlob::RunIterator& it,
const GrClip& clip, const SkPaint& skPaint,
SkDrawFilter* drawFilter, const SkMatrix& viewMatrix,
const SkIRect& clipBounds, SkScalar x, SkScalar y) {
@@ -2250,6 +2250,7 @@ DRAW_BATCH_TEST_DEFINE(TextBlobBatch) {
desc.fHeight = 1024;
desc.fConfig = kRGBA_8888_GrPixelConfig;
desc.fSampleCnt = 0;
+ desc.fIsMipMapped = false;
SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(desc, true, nullptr, 0));
SkASSERT(texture);
SkASSERT(nullptr != texture->asRenderTarget());

Powered by Google App Engine
This is Rietveld 408576698