| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 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 "SkAdvancedTypefaceMetrics.h" | 9 #include "SkAdvancedTypefaceMetrics.h" |
| 10 #include "SkBase64.h" | 10 #include "SkBase64.h" |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 fDC = CreateCompatibleDC(0); | 419 fDC = CreateCompatibleDC(0); |
| 420 if (0 == fDC) { | 420 if (0 == fDC) { |
| 421 return NULL; | 421 return NULL; |
| 422 } | 422 } |
| 423 SetGraphicsMode(fDC, GM_ADVANCED); | 423 SetGraphicsMode(fDC, GM_ADVANCED); |
| 424 SetBkMode(fDC, TRANSPARENT); | 424 SetBkMode(fDC, TRANSPARENT); |
| 425 SetTextAlign(fDC, TA_LEFT | TA_BASELINE); | 425 SetTextAlign(fDC, TA_LEFT | TA_BASELINE); |
| 426 SelectObject(fDC, fFont); | 426 SelectObject(fDC, fFont); |
| 427 | 427 |
| 428 COLORREF color = 0x00FFFFFF; | 428 COLORREF color = 0x00FFFFFF; |
| 429 COLORREF prev = SetTextColor(fDC, color); | 429 SkDEBUGCODE(COLORREF prev =) SetTextColor(fDC, color); |
| 430 SkASSERT(prev != CLR_INVALID); | 430 SkASSERT(prev != CLR_INVALID); |
| 431 } | 431 } |
| 432 | 432 |
| 433 if (fBM && (fIsBW != isBW || fWidth < glyph.fWidth || fHeight < glyph.fHeigh
t)) { | 433 if (fBM && (fIsBW != isBW || fWidth < glyph.fWidth || fHeight < glyph.fHeigh
t)) { |
| 434 DeleteObject(fBM); | 434 DeleteObject(fBM); |
| 435 fBM = 0; | 435 fBM = 0; |
| 436 } | 436 } |
| 437 fIsBW = isBW; | 437 fIsBW = isBW; |
| 438 | 438 |
| 439 fWidth = SkMax32(fWidth, glyph.fWidth); | 439 fWidth = SkMax32(fWidth, glyph.fWidth); |
| (...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 if (isLCD(*rec) && !isAxisAligned(*rec)) { | 1691 if (isLCD(*rec) && !isAxisAligned(*rec)) { |
| 1692 rec->fMaskFormat = SkMask::kA8_Format; | 1692 rec->fMaskFormat = SkMask::kA8_Format; |
| 1693 } | 1693 } |
| 1694 #endif | 1694 #endif |
| 1695 | 1695 |
| 1696 if (!fCanBeLCD && isLCD(*rec)) { | 1696 if (!fCanBeLCD && isLCD(*rec)) { |
| 1697 rec->fMaskFormat = SkMask::kA8_Format; | 1697 rec->fMaskFormat = SkMask::kA8_Format; |
| 1698 rec->fFlags &= ~SkScalerContext::kGenA8FromLCD_Flag; | 1698 rec->fFlags &= ~SkScalerContext::kGenA8FromLCD_Flag; |
| 1699 } | 1699 } |
| 1700 } | 1700 } |
| OLD | NEW |