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 453233002: Hiding cast of WebCore WindRule to SkPath::FillType (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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/Path.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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 { 79 {
80 return SkRect::MakeLTRB(SkFloatToScalar(rect.x()), SkFloatToScalar(rect.y()) , 80 return SkRect::MakeLTRB(SkFloatToScalar(rect.x()), SkFloatToScalar(rect.y()) ,
81 SkFloatToScalar(rect.maxX()), SkFloatToScalar(rect.maxY())); 81 SkFloatToScalar(rect.maxX()), SkFloatToScalar(rect.maxY()));
82 } 82 }
83 83
84 inline bool WebCoreFloatNearlyEqual(float a, float b) 84 inline bool WebCoreFloatNearlyEqual(float a, float b)
85 { 85 {
86 return SkScalarNearlyEqual(WebCoreFloatToSkScalar(a), WebCoreFloatToSkScalar (b)); 86 return SkScalarNearlyEqual(WebCoreFloatToSkScalar(a), WebCoreFloatToSkScalar (b));
87 } 87 }
88 88
89 inline SkPath::FillType WebCoreWindRuleToSkFillType(WindRule rule)
90 {
91 return static_cast<SkPath::FillType>(rule);
92 }
93
89 // Determine if a given WebKit point is contained in a path 94 // Determine if a given WebKit point is contained in a path
90 bool PLATFORM_EXPORT SkPathContainsPoint(const SkPath&, const FloatPoint&, SkPat h::FillType); 95 bool PLATFORM_EXPORT SkPathContainsPoint(const SkPath&, const FloatPoint&, SkPat h::FillType);
91 96
92 SkMatrix PLATFORM_EXPORT affineTransformToSkMatrix(const AffineTransform&); 97 SkMatrix PLATFORM_EXPORT affineTransformToSkMatrix(const AffineTransform&);
93 98
94 bool nearlyIntegral(float value); 99 bool nearlyIntegral(float value);
95 100
96 InterpolationQuality limitInterpolationQuality(const GraphicsContext*, Interpola tionQuality resampling); 101 InterpolationQuality limitInterpolationQuality(const GraphicsContext*, Interpola tionQuality resampling);
97 102
98 InterpolationQuality computeInterpolationQuality( 103 InterpolationQuality computeInterpolationQuality(
99 const SkMatrix&, 104 const SkMatrix&,
100 float srcWidth, 105 float srcWidth,
101 float srcHeight, 106 float srcHeight,
102 float destWidth, 107 float destWidth,
103 float destHeight, 108 float destHeight,
104 bool isDataComplete = true); 109 bool isDataComplete = true);
105 110
106 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect); 111 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect);
107 112
108 } // namespace blink 113 } // namespace blink
109 114
110 #endif // SkiaUtils_h 115 #endif // SkiaUtils_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/Path.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698