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

Unified Diff: src/gpu/GrFontScaler.cpp

Issue 1261433006: Another small fix to GrFontScaler (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrFontScaler.cpp
diff --git a/src/gpu/GrFontScaler.cpp b/src/gpu/GrFontScaler.cpp
index b4ec1beed35106026cbe6055395e5e5758c17ab3..8c0e0e69fccd06625bf8a61e07bc134a90d390f8 100644
--- a/src/gpu/GrFontScaler.cpp
+++ b/src/gpu/GrFontScaler.cpp
@@ -140,7 +140,7 @@ bool GrFontScaler::getPackedGlyphImage(const SkGlyph& glyph, int width, int heig
if (SkMask::kBW_Format == glyph.fMaskFormat) {
// expand bits to our mask type
const uint8_t* bits = reinterpret_cast<const uint8_t*>(src);
- switch (this->getMaskFormat()) {
+ switch (expectedMaskFormat) {
case kA8_GrMaskFormat:{
uint8_t* bytes = reinterpret_cast<uint8_t*>(dst);
expand_bits(bytes, bits, width, height, dstRB, srcRB);
@@ -157,7 +157,7 @@ bool GrFontScaler::getPackedGlyphImage(const SkGlyph& glyph, int width, int heig
} else if (srcRB == dstRB) {
memcpy(dst, src, dstRB * height);
} else {
- const int bbp = GrMaskFormatBytesPerPixel(this->getMaskFormat());
+ const int bbp = GrMaskFormatBytesPerPixel(expectedMaskFormat);
for (int y = 0; y < height; y++) {
memcpy(dst, src, width * bbp);
src = (const char*)src + srcRB;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698