| 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 "config.h" | 27 #include "sky/engine/config.h" |
| 28 #include "platform/graphics/GraphicsContext.h" | 28 #include "sky/engine/platform/graphics/GraphicsContext.h" |
| 29 | 29 |
| 30 #include "platform/TraceEvent.h" | 30 #include "sky/engine/platform/TraceEvent.h" |
| 31 #include "platform/geometry/IntRect.h" | 31 #include "sky/engine/platform/geometry/IntRect.h" |
| 32 #include "platform/geometry/RoundedRect.h" | 32 #include "sky/engine/platform/geometry/RoundedRect.h" |
| 33 #include "platform/graphics/BitmapImage.h" | 33 #include "sky/engine/platform/graphics/BitmapImage.h" |
| 34 #include "platform/graphics/DisplayList.h" | 34 #include "sky/engine/platform/graphics/DisplayList.h" |
| 35 #include "platform/graphics/Gradient.h" | 35 #include "sky/engine/platform/graphics/Gradient.h" |
| 36 #include "platform/graphics/ImageBuffer.h" | 36 #include "sky/engine/platform/graphics/ImageBuffer.h" |
| 37 #include "platform/graphics/skia/SkiaUtils.h" | 37 #include "sky/engine/platform/graphics/skia/SkiaUtils.h" |
| 38 #include "platform/text/BidiResolver.h" | 38 #include "sky/engine/platform/text/BidiResolver.h" |
| 39 #include "platform/text/TextRunIterator.h" | 39 #include "sky/engine/platform/text/TextRunIterator.h" |
| 40 #include "platform/weborigin/KURL.h" | 40 #include "sky/engine/platform/weborigin/KURL.h" |
| 41 #include "sky/engine/wtf/Assertions.h" |
| 42 #include "sky/engine/wtf/MathExtras.h" |
| 41 #include "third_party/skia/include/core/SkAnnotation.h" | 43 #include "third_party/skia/include/core/SkAnnotation.h" |
| 42 #include "third_party/skia/include/core/SkClipStack.h" | 44 #include "third_party/skia/include/core/SkClipStack.h" |
| 43 #include "third_party/skia/include/core/SkColorFilter.h" | 45 #include "third_party/skia/include/core/SkColorFilter.h" |
| 44 #include "third_party/skia/include/core/SkData.h" | 46 #include "third_party/skia/include/core/SkData.h" |
| 45 #include "third_party/skia/include/core/SkDevice.h" | 47 #include "third_party/skia/include/core/SkDevice.h" |
| 46 #include "third_party/skia/include/core/SkPicture.h" | 48 #include "third_party/skia/include/core/SkPicture.h" |
| 47 #include "third_party/skia/include/core/SkRRect.h" | 49 #include "third_party/skia/include/core/SkRRect.h" |
| 48 #include "third_party/skia/include/core/SkRefCnt.h" | 50 #include "third_party/skia/include/core/SkRefCnt.h" |
| 49 #include "third_party/skia/include/core/SkSurface.h" | 51 #include "third_party/skia/include/core/SkSurface.h" |
| 50 #include "third_party/skia/include/effects/SkBlurMaskFilter.h" | 52 #include "third_party/skia/include/effects/SkBlurMaskFilter.h" |
| 51 #include "third_party/skia/include/effects/SkCornerPathEffect.h" | 53 #include "third_party/skia/include/effects/SkCornerPathEffect.h" |
| 52 #include "third_party/skia/include/effects/SkLumaColorFilter.h" | 54 #include "third_party/skia/include/effects/SkLumaColorFilter.h" |
| 53 #include "third_party/skia/include/effects/SkMatrixImageFilter.h" | 55 #include "third_party/skia/include/effects/SkMatrixImageFilter.h" |
| 54 #include "third_party/skia/include/effects/SkPictureImageFilter.h" | 56 #include "third_party/skia/include/effects/SkPictureImageFilter.h" |
| 55 #include "third_party/skia/include/gpu/GrRenderTarget.h" | 57 #include "third_party/skia/include/gpu/GrRenderTarget.h" |
| 56 #include "third_party/skia/include/gpu/GrTexture.h" | 58 #include "third_party/skia/include/gpu/GrTexture.h" |
| 57 #include "wtf/Assertions.h" | |
| 58 #include "wtf/MathExtras.h" | |
| 59 | 59 |
| 60 namespace blink { | 60 namespace blink { |
| 61 | 61 |
| 62 namespace { | 62 namespace { |
| 63 | 63 |
| 64 class CompatibleImageBufferSurface : public ImageBufferSurface { | 64 class CompatibleImageBufferSurface : public ImageBufferSurface { |
| 65 WTF_MAKE_NONCOPYABLE(CompatibleImageBufferSurface); WTF_MAKE_FAST_ALLOCATED; | 65 WTF_MAKE_NONCOPYABLE(CompatibleImageBufferSurface); WTF_MAKE_FAST_ALLOCATED; |
| 66 public: | 66 public: |
| 67 CompatibleImageBufferSurface(PassRefPtr<SkSurface> surface, const IntSize& s
ize, OpacityMode opacityMode) | 67 CompatibleImageBufferSurface(PassRefPtr<SkSurface> surface, const IntSize& s
ize, OpacityMode opacityMode) |
| 68 : ImageBufferSurface(size, opacityMode) | 68 : ImageBufferSurface(size, opacityMode) |
| (...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1866 // FIXME: This is to not break tests (it results in the filter bitmap fl
ag | 1866 // FIXME: This is to not break tests (it results in the filter bitmap fl
ag |
| 1867 // being set to true). We need to decide if we respect InterpolationNone | 1867 // being set to true). We need to decide if we respect InterpolationNone |
| 1868 // being returned from computeInterpolationQuality. | 1868 // being returned from computeInterpolationQuality. |
| 1869 resampling = InterpolationLow; | 1869 resampling = InterpolationLow; |
| 1870 } | 1870 } |
| 1871 resampling = limitInterpolationQuality(this, resampling); | 1871 resampling = limitInterpolationQuality(this, resampling); |
| 1872 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling)); | 1872 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling)); |
| 1873 } | 1873 } |
| 1874 | 1874 |
| 1875 } // namespace blink | 1875 } // namespace blink |
| OLD | NEW |