| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | 23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 24 * THE POSSIBILITY OF SUCH DAMAGE. | 24 * THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "platform/graphics/GraphicsContext.h" | 27 #include "platform/graphics/GraphicsContext.h" |
| 28 | 28 |
| 29 #include <memory> | 29 #include <memory> |
| 30 #include "platform/geometry/FloatRect.h" | 30 #include "platform/geometry/FloatRect.h" |
| 31 #include "platform/geometry/FloatRoundedRect.h" | 31 #include "platform/geometry/FloatRoundedRect.h" |
| 32 #include "platform/geometry/IntRect.h" | 32 #include "platform/geometry/IntRect.h" |
| 33 #include "platform/graphics/ColorSpace.h" | |
| 34 #include "platform/graphics/GraphicsContextStateSaver.h" | 33 #include "platform/graphics/GraphicsContextStateSaver.h" |
| 35 #include "platform/graphics/ImageBuffer.h" | 34 #include "platform/graphics/ImageBuffer.h" |
| 35 #include "platform/graphics/InterpolationSpace.h" |
| 36 #include "platform/graphics/Path.h" | 36 #include "platform/graphics/Path.h" |
| 37 #include "platform/graphics/paint/PaintController.h" | 37 #include "platform/graphics/paint/PaintController.h" |
| 38 #include "platform/graphics/paint/PaintRecord.h" | 38 #include "platform/graphics/paint/PaintRecord.h" |
| 39 #include "platform/graphics/paint/PaintRecorder.h" | 39 #include "platform/graphics/paint/PaintRecorder.h" |
| 40 #include "platform/instrumentation/tracing/TraceEvent.h" | 40 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 41 #include "platform/weborigin/KURL.h" | 41 #include "platform/weborigin/KURL.h" |
| 42 #include "platform/wtf/Assertions.h" | 42 #include "platform/wtf/Assertions.h" |
| 43 #include "platform/wtf/MathExtras.h" | 43 #include "platform/wtf/MathExtras.h" |
| 44 #include "skia/ext/platform_canvas.h" | 44 #include "skia/ext/platform_canvas.h" |
| 45 #include "third_party/skia/include/core/SkAnnotation.h" | 45 #include "third_party/skia/include/core/SkAnnotation.h" |
| (...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1255 } | 1255 } |
| 1256 } | 1256 } |
| 1257 } | 1257 } |
| 1258 | 1258 |
| 1259 sk_sp<SkColorFilter> GraphicsContext::WebCoreColorFilterToSkiaColorFilter( | 1259 sk_sp<SkColorFilter> GraphicsContext::WebCoreColorFilterToSkiaColorFilter( |
| 1260 ColorFilter color_filter) { | 1260 ColorFilter color_filter) { |
| 1261 switch (color_filter) { | 1261 switch (color_filter) { |
| 1262 case kColorFilterLuminanceToAlpha: | 1262 case kColorFilterLuminanceToAlpha: |
| 1263 return SkLumaColorFilter::Make(); | 1263 return SkLumaColorFilter::Make(); |
| 1264 case kColorFilterLinearRGBToSRGB: | 1264 case kColorFilterLinearRGBToSRGB: |
| 1265 return ColorSpaceUtilities::CreateColorSpaceFilter(kColorSpaceLinearRGB, | 1265 return InterpolationSpaceUtilities::CreateInterpolationSpaceFilter( |
| 1266 kColorSpaceDeviceRGB); | 1266 kInterpolationSpaceLinear, kInterpolationSpaceSRGB); |
| 1267 case kColorFilterSRGBToLinearRGB: | 1267 case kColorFilterSRGBToLinearRGB: |
| 1268 return ColorSpaceUtilities::CreateColorSpaceFilter(kColorSpaceDeviceRGB, | 1268 return InterpolationSpaceUtilities::CreateInterpolationSpaceFilter( |
| 1269 kColorSpaceLinearRGB); | 1269 kInterpolationSpaceSRGB, kInterpolationSpaceLinear); |
| 1270 case kColorFilterNone: | 1270 case kColorFilterNone: |
| 1271 break; | 1271 break; |
| 1272 default: | 1272 default: |
| 1273 NOTREACHED(); | 1273 NOTREACHED(); |
| 1274 break; | 1274 break; |
| 1275 } | 1275 } |
| 1276 | 1276 |
| 1277 return nullptr; | 1277 return nullptr; |
| 1278 } | 1278 } |
| 1279 | 1279 |
| 1280 } // namespace blink | 1280 } // namespace blink |
| OLD | NEW |