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

Side by Side Diff: src/ports/SkFontHost_FreeType_common.cpp

Issue 1014533004: SkPaint::FilterLevel -> SkFilterQuality (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/pipe/SkGPipeWrite.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006-2012 The Android Open Source Project 2 * Copyright 2006-2012 The Android Open Source Project
3 * Copyright 2012 Mozilla Foundation 3 * Copyright 2012 Mozilla Foundation
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } else { 456 } else {
457 dstBitmap.setPixels(glyph.fImage); 457 dstBitmap.setPixels(glyph.fImage);
458 } 458 }
459 459
460 // Scale unscaledBitmap into dstBitmap. 460 // Scale unscaledBitmap into dstBitmap.
461 SkCanvas canvas(dstBitmap); 461 SkCanvas canvas(dstBitmap);
462 canvas.clear(SK_ColorTRANSPARENT); 462 canvas.clear(SK_ColorTRANSPARENT);
463 canvas.scale(SkIntToScalar(glyph.fWidth) / SkIntToScalar(face->glyph ->bitmap.width), 463 canvas.scale(SkIntToScalar(glyph.fWidth) / SkIntToScalar(face->glyph ->bitmap.width),
464 SkIntToScalar(glyph.fHeight) / SkIntToScalar(face->glyp h->bitmap.rows)); 464 SkIntToScalar(glyph.fHeight) / SkIntToScalar(face->glyp h->bitmap.rows));
465 SkPaint paint; 465 SkPaint paint;
466 paint.setFilterLevel(SkPaint::kMedium_FilterLevel); 466 paint.setFilterQuality(kMedium_SkFilterQuality);
467 canvas.drawBitmap(unscaledBitmap, 0, 0, &paint); 467 canvas.drawBitmap(unscaledBitmap, 0, 0, &paint);
468 468
469 // If the destination is BW or LCD, convert from A8. 469 // If the destination is BW or LCD, convert from A8.
470 if (SkMask::kBW_Format == maskFormat) { 470 if (SkMask::kBW_Format == maskFormat) {
471 // Copy the A8 dstBitmap into the A1 glyph.fImage. 471 // Copy the A8 dstBitmap into the A1 glyph.fImage.
472 SkMask dstMask; 472 SkMask dstMask;
473 glyph.toMask(&dstMask); 473 glyph.toMask(&dstMask);
474 packA8ToA1(dstMask, dstBitmap.getAddr8(0, 0), dstBitmap.rowBytes ()); 474 packA8ToA1(dstMask, dstBitmap.getAddr8(0, 0), dstBitmap.rowBytes ());
475 } else if (SkMask::kLCD16_Format == maskFormat) { 475 } else if (SkMask::kLCD16_Format == maskFormat) {
476 // Copy the A8 dstBitmap into the LCD16 glyph.fImage. 476 // Copy the A8 dstBitmap into the LCD16 glyph.fImage.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 556
557 FT_Error err = FT_Outline_Decompose(&face->glyph->outline, &funcs, path); 557 FT_Error err = FT_Outline_Decompose(&face->glyph->outline, &funcs, path);
558 558
559 if (err != 0) { 559 if (err != 0) {
560 path->reset(); 560 path->reset();
561 return; 561 return;
562 } 562 }
563 563
564 path->close(); 564 path->close();
565 } 565 }
OLDNEW
« no previous file with comments | « src/pipe/SkGPipeWrite.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698