OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
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 20 matching lines...) Expand all Loading... |
31 #include "SkColorMatrixFilter.h" | 31 #include "SkColorMatrixFilter.h" |
32 #include "SkTableColorFilter.h" | 32 #include "SkTableColorFilter.h" |
33 #include "platform/graphics/filters/FilterEffect.h" | 33 #include "platform/graphics/filters/FilterEffect.h" |
34 #include "platform/graphics/filters/FilterOperations.h" | 34 #include "platform/graphics/filters/FilterOperations.h" |
35 #include "platform/graphics/filters/SourceGraphic.h" | 35 #include "platform/graphics/filters/SourceGraphic.h" |
36 #include "platform/graphics/skia/SkiaUtils.h" | 36 #include "platform/graphics/skia/SkiaUtils.h" |
37 #include "public/platform/WebPoint.h" | 37 #include "public/platform/WebPoint.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 SkiaImageFilterBuilder::SkiaImageFilterBuilder() | 41 SkiaImageFilterBuilder::SkiaImageFilterBuilder(GraphicsContext* context) |
42 : m_context(nullptr) | 42 : m_context(context) |
43 , m_sourceGraphic(nullptr) | |
44 { | 43 { |
45 } | 44 } |
46 | 45 |
47 SkiaImageFilterBuilder::SkiaImageFilterBuilder(GraphicsContext* context) | |
48 : m_context(context) | |
49 , m_sourceGraphic(nullptr) | |
50 { | |
51 } | |
52 | |
53 SkiaImageFilterBuilder::~SkiaImageFilterBuilder() | 46 SkiaImageFilterBuilder::~SkiaImageFilterBuilder() |
54 { | 47 { |
55 } | 48 } |
56 | 49 |
57 PassRefPtr<SkImageFilter> SkiaImageFilterBuilder::build(FilterEffect* effect, Co
lorSpace colorSpace, bool destinationRequiresValidPreMultipliedPixels) | 50 PassRefPtr<SkImageFilter> SkiaImageFilterBuilder::build(FilterEffect* effect, Co
lorSpace colorSpace, bool destinationRequiresValidPreMultipliedPixels) |
58 { | 51 { |
59 if (!effect) | 52 if (!effect) |
60 return nullptr; | 53 return nullptr; |
61 | 54 |
62 bool requiresPMColorValidation = effect->mayProduceInvalidPreMultipliedPixel
s() && destinationRequiresValidPreMultipliedPixels; | 55 bool requiresPMColorValidation = effect->mayProduceInvalidPreMultipliedPixel
s() && destinationRequiresValidPreMultipliedPixels; |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 filters->appendReferenceFilter(filter.get()); | 175 filters->appendReferenceFilter(filter.get()); |
183 } | 176 } |
184 } | 177 } |
185 | 178 |
186 PassRefPtr<SkImageFilter> SkiaImageFilterBuilder::buildTransform(const AffineTra
nsform& transform, SkImageFilter* input) | 179 PassRefPtr<SkImageFilter> SkiaImageFilterBuilder::buildTransform(const AffineTra
nsform& transform, SkImageFilter* input) |
187 { | 180 { |
188 return adoptRef(SkImageFilter::CreateMatrixFilter(affineTransformToSkMatrix(
transform), kHigh_SkFilterQuality, input)); | 181 return adoptRef(SkImageFilter::CreateMatrixFilter(affineTransformToSkMatrix(
transform), kHigh_SkFilterQuality, input)); |
189 } | 182 } |
190 | 183 |
191 } // namespace blink | 184 } // namespace blink |
OLD | NEW |