| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 namespace blink { | 47 namespace blink { |
| 48 | 48 |
| 49 class GraphicsContext; | 49 class GraphicsContext; |
| 50 | 50 |
| 51 SkXfermode::Mode PLATFORM_EXPORT WebCoreCompositeToSkiaComposite(CompositeOperat
or, WebBlendMode = WebBlendModeNormal); | 51 SkXfermode::Mode PLATFORM_EXPORT WebCoreCompositeToSkiaComposite(CompositeOperat
or, WebBlendMode = WebBlendModeNormal); |
| 52 | 52 |
| 53 // move this guy into SkColor.h | 53 // move this guy into SkColor.h |
| 54 SkColor SkPMColorToColor(SkPMColor); | 54 SkColor SkPMColorToColor(SkPMColor); |
| 55 | 55 |
| 56 inline SkPaint::FilterLevel WebCoreInterpolationQualityToSkFilterLevel(Interpola
tionQuality quality) | 56 inline SkFilterQuality WebCoreInterpolationQualityToSkFilterQuality(Interpolatio
nQuality quality) |
| 57 { | 57 { |
| 58 // FIXME: this reflects existing client mappings, but should probably | 58 // FIXME: this reflects existing client mappings, but should probably |
| 59 // be expanded to map higher level interpolations more accurately. | 59 // be expanded to map higher level interpolations more accurately. |
| 60 return quality != InterpolationNone ? SkPaint::kLow_FilterLevel : SkPaint::k
None_FilterLevel; | 60 return quality != InterpolationNone ? kLow_SkFilterQuality : kNone_SkFilterQ
uality; |
| 61 } | 61 } |
| 62 | 62 |
| 63 // Skia has problems when passed infinite, etc floats, filter them to 0. | 63 // Skia has problems when passed infinite, etc floats, filter them to 0. |
| 64 inline SkScalar WebCoreFloatToSkScalar(float f) | 64 inline SkScalar WebCoreFloatToSkScalar(float f) |
| 65 { | 65 { |
| 66 return SkFloatToScalar(std::isfinite(f) ? f : 0); | 66 return SkFloatToScalar(std::isfinite(f) ? f : 0); |
| 67 } | 67 } |
| 68 | 68 |
| 69 inline SkScalar WebCoreDoubleToSkScalar(double d) | 69 inline SkScalar WebCoreDoubleToSkScalar(double d) |
| 70 { | 70 { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 float srcHeight, | 102 float srcHeight, |
| 103 float destWidth, | 103 float destWidth, |
| 104 float destHeight, | 104 float destHeight, |
| 105 bool isDataComplete = true); | 105 bool isDataComplete = true); |
| 106 | 106 |
| 107 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect); | 107 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect); |
| 108 | 108 |
| 109 } // namespace blink | 109 } // namespace blink |
| 110 | 110 |
| 111 #endif // SKY_ENGINE_PLATFORM_GRAPHICS_SKIA_SKIAUTILS_H_ | 111 #endif // SKY_ENGINE_PLATFORM_GRAPHICS_SKIA_SKIAUTILS_H_ |
| OLD | NEW |