| OLD | NEW |
| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 result.set(SkMatrix::kMPersp2, SK_Scalar1); | 236 result.set(SkMatrix::kMPersp2, SK_Scalar1); |
| 237 | 237 |
| 238 return result; | 238 return result; |
| 239 } | 239 } |
| 240 | 240 |
| 241 bool nearlyIntegral(float value) | 241 bool nearlyIntegral(float value) |
| 242 { | 242 { |
| 243 return fabs(value - floorf(value)) < std::numeric_limits<float>::epsilon(); | 243 return fabs(value - floorf(value)) < std::numeric_limits<float>::epsilon(); |
| 244 } | 244 } |
| 245 | 245 |
| 246 InterpolationQuality limitInterpolationQuality(const GraphicsContext* context, I
nterpolationQuality resampling) | 246 InterpolationQuality limitInterpolationQuality(const GraphicsContext& context, I
nterpolationQuality resampling) |
| 247 { | 247 { |
| 248 return std::min(resampling, context->imageInterpolationQuality()); | 248 return std::min(resampling, context.imageInterpolationQuality()); |
| 249 } | 249 } |
| 250 | 250 |
| 251 InterpolationQuality computeInterpolationQuality( | 251 InterpolationQuality computeInterpolationQuality( |
| 252 float srcWidth, | 252 float srcWidth, |
| 253 float srcHeight, | 253 float srcHeight, |
| 254 float destWidth, | 254 float destWidth, |
| 255 float destHeight, | 255 float destHeight, |
| 256 bool isDataComplete) | 256 bool isDataComplete) |
| 257 { | 257 { |
| 258 // The percent change below which we will not resample. This usually means | 258 // The percent change below which we will not resample. This usually means |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 paint.setAlpha(128); | 397 paint.setAlpha(128); |
| 398 paint.setStrokeWidth(paint.getStrokeWidth() * 0.5f); | 398 paint.setStrokeWidth(paint.getStrokeWidth() * 0.5f); |
| 399 drawFocusRingPrimitive(primitive, canvas, paint, cornerRadius); | 399 drawFocusRingPrimitive(primitive, canvas, paint, cornerRadius); |
| 400 #endif | 400 #endif |
| 401 } | 401 } |
| 402 | 402 |
| 403 template void PLATFORM_EXPORT drawPlatformFocusRing<SkRect>(const SkRect&, SkCan
vas*, SkColor, int width); | 403 template void PLATFORM_EXPORT drawPlatformFocusRing<SkRect>(const SkRect&, SkCan
vas*, SkColor, int width); |
| 404 template void PLATFORM_EXPORT drawPlatformFocusRing<SkPath>(const SkPath&, SkCan
vas*, SkColor, int width); | 404 template void PLATFORM_EXPORT drawPlatformFocusRing<SkPath>(const SkPath&, SkCan
vas*, SkColor, int width); |
| 405 | 405 |
| 406 } // namespace blink | 406 } // namespace blink |
| OLD | NEW |