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

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

Issue 1220113003: Remove &glyph from SkASSERT. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkTypes.h" 8 #include "SkTypes.h"
9 #undef GetGlyphIndices 9 #undef GetGlyphIndices
10 10
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) { 715 if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) {
716 rgb_to_lcd16<false, false>(src, glyph, fPreBlend.fR, fPreBlend.f G, fPreBlend.fB); 716 rgb_to_lcd16<false, false>(src, glyph, fPreBlend.fR, fPreBlend.f G, fPreBlend.fB);
717 } else { 717 } else {
718 rgb_to_lcd16<false, true>(src, glyph, fPreBlend.fR, fPreBlend.fG , fPreBlend.fB); 718 rgb_to_lcd16<false, true>(src, glyph, fPreBlend.fR, fPreBlend.fG , fPreBlend.fB);
719 } 719 }
720 } 720 }
721 } 721 }
722 } 722 }
723 723
724 void SkScalerContext_DW::generatePath(const SkGlyph& glyph, SkPath* path) { 724 void SkScalerContext_DW::generatePath(const SkGlyph& glyph, SkPath* path) {
725 SkASSERT(&glyph && path); 725 SkASSERT(path);
726 726
727 path->reset(); 727 path->reset();
728 728
729 SkTScopedComPtr<IDWriteGeometrySink> geometryToPath; 729 SkTScopedComPtr<IDWriteGeometrySink> geometryToPath;
730 HRVM(SkDWriteGeometrySink::Create(path, &geometryToPath), 730 HRVM(SkDWriteGeometrySink::Create(path, &geometryToPath),
731 "Could not create geometry to path converter."); 731 "Could not create geometry to path converter.");
732 uint16_t glyphId = glyph.getGlyphID(); 732 uint16_t glyphId = glyph.getGlyphID();
733 //TODO: convert to<->from DIUs? This would make a difference if hinting. 733 //TODO: convert to<->from DIUs? This would make a difference if hinting.
734 //It may not be needed, it appears that DirectWrite only hints at em size. 734 //It may not be needed, it appears that DirectWrite only hints at em size.
735 HRVM(fTypeface->fDWriteFontFace->GetGlyphRunOutline(SkScalarToFloat(fTextSiz eRender), 735 HRVM(fTypeface->fDWriteFontFace->GetGlyphRunOutline(SkScalarToFloat(fTextSiz eRender),
736 &glyphId, 736 &glyphId,
737 NULL, //advances 737 NULL, //advances
738 NULL, //offsets 738 NULL, //offsets
739 1, //num glyphs 739 1, //num glyphs
740 FALSE, //sideways 740 FALSE, //sideways
741 FALSE, //rtl 741 FALSE, //rtl
742 geometryToPath.get()), 742 geometryToPath.get()),
743 "Could not create glyph outline."); 743 "Could not create glyph outline.");
744 744
745 path->transform(fSkXform); 745 path->transform(fSkXform);
746 } 746 }
OLDNEW
« 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