| 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 |
| 11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
| 12 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
| 13 * | 13 * |
| 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' | 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | 15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS | 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 18 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 18 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 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 "platform/geometry/FloatRect.h" | 30 #include "platform/geometry/FloatRect.h" |
| 30 #include "platform/geometry/FloatRoundedRect.h" | 31 #include "platform/geometry/FloatRoundedRect.h" |
| 31 #include "platform/geometry/IntRect.h" | 32 #include "platform/geometry/IntRect.h" |
| 32 #include "platform/graphics/ColorSpace.h" | 33 #include "platform/graphics/ColorSpace.h" |
| 33 #include "platform/graphics/GraphicsContextStateSaver.h" | 34 #include "platform/graphics/GraphicsContextStateSaver.h" |
| 34 #include "platform/graphics/ImageBuffer.h" | 35 #include "platform/graphics/ImageBuffer.h" |
| 35 #include "platform/graphics/Path.h" | 36 #include "platform/graphics/Path.h" |
| 36 #include "platform/graphics/paint/PaintController.h" | 37 #include "platform/graphics/paint/PaintController.h" |
| 37 #include "platform/graphics/paint/PaintRecord.h" | 38 #include "platform/graphics/paint/PaintRecord.h" |
| 38 #include "platform/graphics/paint/PaintRecorder.h" | 39 #include "platform/graphics/paint/PaintRecorder.h" |
| 39 #include "platform/instrumentation/tracing/TraceEvent.h" | 40 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 40 #include "platform/weborigin/KURL.h" | 41 #include "platform/weborigin/KURL.h" |
| 42 #include "platform/wtf/Assertions.h" |
| 43 #include "platform/wtf/MathExtras.h" |
| 41 #include "skia/ext/platform_canvas.h" | 44 #include "skia/ext/platform_canvas.h" |
| 42 #include "third_party/skia/include/core/SkAnnotation.h" | 45 #include "third_party/skia/include/core/SkAnnotation.h" |
| 43 #include "third_party/skia/include/core/SkColorFilter.h" | 46 #include "third_party/skia/include/core/SkColorFilter.h" |
| 44 #include "third_party/skia/include/core/SkData.h" | 47 #include "third_party/skia/include/core/SkData.h" |
| 45 #include "third_party/skia/include/core/SkRRect.h" | 48 #include "third_party/skia/include/core/SkRRect.h" |
| 46 #include "third_party/skia/include/core/SkRefCnt.h" | 49 #include "third_party/skia/include/core/SkRefCnt.h" |
| 47 #include "third_party/skia/include/effects/SkGradientShader.h" | 50 #include "third_party/skia/include/effects/SkGradientShader.h" |
| 48 #include "third_party/skia/include/effects/SkLumaColorFilter.h" | 51 #include "third_party/skia/include/effects/SkLumaColorFilter.h" |
| 49 #include "third_party/skia/include/effects/SkPictureImageFilter.h" | 52 #include "third_party/skia/include/effects/SkPictureImageFilter.h" |
| 50 #include "third_party/skia/include/pathops/SkPathOps.h" | 53 #include "third_party/skia/include/pathops/SkPathOps.h" |
| 51 #include "third_party/skia/include/utils/SkNullCanvas.h" | 54 #include "third_party/skia/include/utils/SkNullCanvas.h" |
| 52 #include "wtf/Assertions.h" | |
| 53 #include "wtf/MathExtras.h" | |
| 54 #include <memory> | |
| 55 | 55 |
| 56 namespace blink { | 56 namespace blink { |
| 57 | 57 |
| 58 GraphicsContext::GraphicsContext(PaintController& paintController, | 58 GraphicsContext::GraphicsContext(PaintController& paintController, |
| 59 DisabledMode disableContextOrPainting, | 59 DisabledMode disableContextOrPainting, |
| 60 SkMetaData* metaData) | 60 SkMetaData* metaData) |
| 61 : m_canvas(nullptr), | 61 : m_canvas(nullptr), |
| 62 m_paintController(paintController), | 62 m_paintController(paintController), |
| 63 m_paintStateStack(), | 63 m_paintStateStack(), |
| 64 m_paintStateIndex(0), | 64 m_paintStateIndex(0), |
| (...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 break; | 1350 break; |
| 1351 default: | 1351 default: |
| 1352 NOTREACHED(); | 1352 NOTREACHED(); |
| 1353 break; | 1353 break; |
| 1354 } | 1354 } |
| 1355 | 1355 |
| 1356 return nullptr; | 1356 return nullptr; |
| 1357 } | 1357 } |
| 1358 | 1358 |
| 1359 } // namespace blink | 1359 } // namespace blink |
| OLD | NEW |