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

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

Issue 1008173003: Move SkPaint mangement for 2D canvas into CanvasRenderingContext2DState (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: applied review comments 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/graphics/ImageBufferSurface.h ('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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
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); 130 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect);
131 131
132 // 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)
134 {
135 SkASSERT(radius > 0);
136 return 0.288675f * radius + 0.5f;
137 }
138
132 } // namespace blink 139 } // namespace blink
133 140
134 #endif // SkiaUtils_h 141 #endif // SkiaUtils_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/ImageBufferSurface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698