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

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

Issue 1093673002: Removing the dependency on GraphicsContext for drawing images in 2D canvas (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: pdr corrections + needsrebaselines Created 5 years, 7 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 | Annotate | Revision Log
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 InterpolationQuality limitInterpolationQuality(const GraphicsContext*, Interpola tionQuality resampling); 120 InterpolationQuality limitInterpolationQuality(const GraphicsContext*, Interpola tionQuality resampling);
121 121
122 InterpolationQuality computeInterpolationQuality( 122 InterpolationQuality computeInterpolationQuality(
123 const SkMatrix&, 123 const SkMatrix&,
124 float srcWidth, 124 float srcWidth,
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);
131
132 // This replicates the old skia behavior when it used to take radius for blur. N ow it takes sigma. 130 // This replicates the old skia behavior when it used to take radius for blur. N ow it takes sigma.
133 inline SkScalar skBlurRadiusToSigma(SkScalar radius) 131 inline SkScalar skBlurRadiusToSigma(SkScalar radius)
134 { 132 {
135 SkASSERT(radius >= 0); 133 SkASSERT(radius >= 0);
136 return 0.288675f * radius + 0.5f; 134 return 0.288675f * radius + 0.5f;
137 } 135 }
138 136
139 } // namespace blink 137 } // namespace blink
140 138
141 #endif // SkiaUtils_h 139 #endif // SkiaUtils_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698