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

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

Issue 2359923004: Remove assert that current color is never used. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 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 #if defined(SK_BUILD_FOR_WIN32) 9 #if defined(SK_BUILD_FOR_WIN32)
10 10
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 if (colorGlyph->paletteIndex != 0xffff) { 801 if (colorGlyph->paletteIndex != 0xffff) {
802 color = SkColorSetARGB(SkFloatToIntRound(colorGlyph->runColor.a * 25 5), 802 color = SkColorSetARGB(SkFloatToIntRound(colorGlyph->runColor.a * 25 5),
803 SkFloatToIntRound(colorGlyph->runColor.r * 25 5), 803 SkFloatToIntRound(colorGlyph->runColor.r * 25 5),
804 SkFloatToIntRound(colorGlyph->runColor.g * 25 5), 804 SkFloatToIntRound(colorGlyph->runColor.g * 25 5),
805 SkFloatToIntRound(colorGlyph->runColor.b * 25 5)); 805 SkFloatToIntRound(colorGlyph->runColor.b * 25 5));
806 } else { 806 } else {
807 // If all components of runColor are 0 or (equivalently) paletteInde x is 0xFFFF then 807 // If all components of runColor are 0 or (equivalently) paletteInde x is 0xFFFF then
808 // the 'current brush' is used. fRec.getLuminanceColor() is kinda so rta what is wanted 808 // the 'current brush' is used. fRec.getLuminanceColor() is kinda so rta what is wanted
809 // here, but not really, it will often be the wrong value because it wan't designed for 809 // here, but not really, it will often be the wrong value because it wan't designed for
810 // this. 810 // this.
811 // In practice, I've not encountered a color glyph that uses the cur rent brush color. 811 // TODO: implement this fully, bug.skia.org/5788
812 // If this assert ever fires, we should verify that the color is ren dered properly.
813 SkASSERT(false);
814 color = fRec.getLuminanceColor(); 812 color = fRec.getLuminanceColor();
815 } 813 }
816 paint.setColor(color); 814 paint.setColor(color);
817 815
818 SkPath path; 816 SkPath path;
819 SkTScopedComPtr<IDWriteGeometrySink> geometryToPath; 817 SkTScopedComPtr<IDWriteGeometrySink> geometryToPath;
820 HRVM(SkDWriteGeometrySink::Create(&path, &geometryToPath), 818 HRVM(SkDWriteGeometrySink::Create(&path, &geometryToPath),
821 "Could not create geometry to path converter."); 819 "Could not create geometry to path converter.");
822 { 820 {
823 SkAutoExclusive l(DWriteFactoryMutex); 821 SkAutoExclusive l(DWriteFactoryMutex);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 FALSE, //sideways 907 FALSE, //sideways
910 FALSE, //rtl 908 FALSE, //rtl
911 geometryToPath.get()), 909 geometryToPath.get()),
912 "Could not create glyph outline."); 910 "Could not create glyph outline.");
913 } 911 }
914 912
915 path->transform(fSkXform); 913 path->transform(fSkXform);
916 } 914 }
917 915
918 #endif//defined(SK_BUILD_FOR_WIN32) 916 #endif//defined(SK_BUILD_FOR_WIN32)
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