OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 } | 74 } |
75 | 75 |
76 DEFINE_TRACE(FilterEffectRenderer) | 76 DEFINE_TRACE(FilterEffectRenderer) |
77 { | 77 { |
78 visitor->trace(m_lastEffect); | 78 visitor->trace(m_lastEffect); |
79 visitor->trace(m_referenceFilters); | 79 visitor->trace(m_referenceFilters); |
80 } | 80 } |
81 | 81 |
82 bool FilterEffectRenderer::build(LayoutObject* renderer, const FilterOperations&
operations) | 82 bool FilterEffectRenderer::build(LayoutObject* renderer, const FilterOperations&
operations) |
83 { | 83 { |
84 const LayoutStyle* style = renderer->style(); | 84 const ComputedStyle* style = renderer->style(); |
85 float zoom = style ? style->effectiveZoom() : 1.0f; | 85 float zoom = style ? style->effectiveZoom() : 1.0f; |
86 | 86 |
87 // Create a parent filter for shorthand filters. These have already been sca
led by the CSS code for page zoom, so scale is 1.0 here. | 87 // Create a parent filter for shorthand filters. These have already been sca
led by the CSS code for page zoom, so scale is 1.0 here. |
88 RefPtrWillBeRawPtr<ReferenceFilter> parentFilter = ReferenceFilter::create(1
.0f); | 88 RefPtrWillBeRawPtr<ReferenceFilter> parentFilter = ReferenceFilter::create(1
.0f); |
89 RefPtrWillBeRawPtr<FilterEffect> previousEffect = SourceGraphic::create(pare
ntFilter.get()); | 89 RefPtrWillBeRawPtr<FilterEffect> previousEffect = SourceGraphic::create(pare
ntFilter.get()); |
90 for (size_t i = 0; i < operations.operations().size(); ++i) { | 90 for (size_t i = 0; i < operations.operations().size(); ++i) { |
91 RefPtrWillBeRawPtr<FilterEffect> effect = nullptr; | 91 RefPtrWillBeRawPtr<FilterEffect> effect = nullptr; |
92 FilterOperation* filterOperation = operations.operations().at(i).get(); | 92 FilterOperation* filterOperation = operations.operations().at(i).get(); |
93 switch (filterOperation->type()) { | 93 switch (filterOperation->type()) { |
94 case FilterOperation::REFERENCE: { | 94 case FilterOperation::REFERENCE: { |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 253 |
254 void FilterEffectRenderer::clearIntermediateResults() | 254 void FilterEffectRenderer::clearIntermediateResults() |
255 { | 255 { |
256 if (m_lastEffect.get()) | 256 if (m_lastEffect.get()) |
257 m_lastEffect->clearResultsRecursive(); | 257 m_lastEffect->clearResultsRecursive(); |
258 } | 258 } |
259 | 259 |
260 | 260 |
261 } // namespace blink | 261 } // namespace blink |
262 | 262 |
OLD | NEW |