| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "platform/graphics/Color.h" | 42 #include "platform/graphics/Color.h" |
| 43 #include "platform/graphics/GraphicsTypes.h" | 43 #include "platform/graphics/GraphicsTypes.h" |
| 44 #include "platform/transforms/AffineTransform.h" | 44 #include "platform/transforms/AffineTransform.h" |
| 45 #include "wtf/MathExtras.h" | 45 #include "wtf/MathExtras.h" |
| 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 CompositeOperator PLATFORM_EXPORT compositeOperatorFromSkia(SkXfermode::Mode); |
| 53 WebBlendMode PLATFORM_EXPORT blendModeFromSkia(SkXfermode::Mode); |
| 52 | 54 |
| 53 inline SkPaint::FilterLevel WebCoreInterpolationQualityToSkFilterLevel(Interpola
tionQuality quality) | 55 inline SkPaint::FilterLevel WebCoreInterpolationQualityToSkFilterLevel(Interpola
tionQuality quality) |
| 54 { | 56 { |
| 55 // FIXME: this reflects existing client mappings, but should probably | 57 // FIXME: this reflects existing client mappings, but should probably |
| 56 // be expanded to map higher level interpolations more accurately. | 58 // be expanded to map higher level interpolations more accurately. |
| 57 return quality != InterpolationNone ? SkPaint::kLow_FilterLevel : SkPaint::k
None_FilterLevel; | 59 return quality != InterpolationNone ? SkPaint::kLow_FilterLevel : SkPaint::k
None_FilterLevel; |
| 58 } | 60 } |
| 59 | 61 |
| 60 // Skia has problems when passed infinite, etc floats, filter them to 0. | 62 // Skia has problems when passed infinite, etc floats, filter them to 0. |
| 61 inline SkScalar WebCoreFloatToSkScalar(float f) | 63 inline SkScalar WebCoreFloatToSkScalar(float f) |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 float srcHeight, | 101 float srcHeight, |
| 100 float destWidth, | 102 float destWidth, |
| 101 float destHeight, | 103 float destHeight, |
| 102 bool isDataComplete = true); | 104 bool isDataComplete = true); |
| 103 | 105 |
| 104 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect); | 106 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect); |
| 105 | 107 |
| 106 } // namespace blink | 108 } // namespace blink |
| 107 | 109 |
| 108 #endif // SkiaUtils_h | 110 #endif // SkiaUtils_h |
| OLD | NEW |