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

Side by Side Diff: Source/platform/graphics/skia/SkiaUtils.h

Issue 1013803002: SkPaint::FilterLevel -> SkFilterQuality (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: I think I caught the last one 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 | « Source/platform/graphics/gpu/DrawingBuffer.cpp ('k') | 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 (c) 2006,2007,2008, Google Inc. All rights reserved. 2 * Copyright (c) 2006,2007,2008, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 int PLATFORM_EXPORT clampedAlphaForBlending(float); 56 int PLATFORM_EXPORT clampedAlphaForBlending(float);
57 57
58 // Multiply a color's alpha channel by an additional alpha factor where 58 // Multiply a color's alpha channel by an additional alpha factor where
59 // alpha is in the range [0, 1]. 59 // alpha is in the range [0, 1].
60 SkColor PLATFORM_EXPORT scaleAlpha(SkColor, float); 60 SkColor PLATFORM_EXPORT scaleAlpha(SkColor, float);
61 61
62 // Multiply a color's alpha channel by an additional alpha factor where 62 // Multiply a color's alpha channel by an additional alpha factor where
63 // alpha is in the range [0, 256]. 63 // alpha is in the range [0, 256].
64 SkColor PLATFORM_EXPORT scaleAlpha(SkColor, int); 64 SkColor PLATFORM_EXPORT scaleAlpha(SkColor, int);
65 65
66 inline SkPaint::FilterLevel WebCoreInterpolationQualityToSkFilterLevel(Interpola tionQuality quality) 66 inline SkFilterQuality WebCoreInterpolationQualityToSkFilterQuality(Interpolatio nQuality quality)
67 { 67 {
68 // FIXME: this reflects existing client mappings, but should probably 68 // FIXME: this reflects existing client mappings, but should probably
69 // be expanded to map higher level interpolations more accurately. 69 // be expanded to map higher level interpolations more accurately.
70 return quality != InterpolationNone ? SkPaint::kLow_FilterLevel : SkPaint::k None_FilterLevel; 70 return quality != InterpolationNone ? kLow_SkFilterQuality : kNone_SkFilterQ uality;
71 } 71 }
72 72
73 // Skia has problems when passed infinite, etc floats, filter them to 0. 73 // Skia has problems when passed infinite, etc floats, filter them to 0.
74 inline SkScalar WebCoreFloatToSkScalar(float f) 74 inline SkScalar WebCoreFloatToSkScalar(float f)
75 { 75 {
76 return SkFloatToScalar(std::isfinite(f) ? f : 0); 76 return SkFloatToScalar(std::isfinite(f) ? f : 0);
77 } 77 }
78 78
79 inline SkScalar WebCoreDoubleToSkScalar(double d) 79 inline SkScalar WebCoreDoubleToSkScalar(double d)
80 { 80 {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 float srcHeight, 125 float srcHeight,
126 float destWidth, 126 float destWidth,
127 float destHeight, 127 float destHeight,
128 bool isDataComplete = true); 128 bool isDataComplete = true);
129 129
130 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect); 130 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect);
131 131
132 } // namespace blink 132 } // namespace blink
133 133
134 #endif // SkiaUtils_h 134 #endif // SkiaUtils_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/gpu/DrawingBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698