Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: Source/WebCore/rendering/FilterEffectRenderer.cpp

Issue 11337009: Merge 132528 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "CustomFilterProgram.h" 47 #include "CustomFilterProgram.h"
48 #include "CustomFilterOperation.h" 48 #include "CustomFilterOperation.h"
49 #include "CustomFilterValidatedProgram.h" 49 #include "CustomFilterValidatedProgram.h"
50 #include "FECustomFilter.h" 50 #include "FECustomFilter.h"
51 #include "RenderView.h" 51 #include "RenderView.h"
52 #include "Settings.h" 52 #include "Settings.h"
53 #endif 53 #endif
54 54
55 #if ENABLE(SVG) 55 #if ENABLE(SVG)
56 #include "CachedSVGDocument.h" 56 #include "CachedSVGDocument.h"
57 #include "CachedSVGDocumentReference.h"
57 #include "SVGElement.h" 58 #include "SVGElement.h"
58 #include "SVGFilterPrimitiveStandardAttributes.h" 59 #include "SVGFilterPrimitiveStandardAttributes.h"
59 #include "SourceAlpha.h" 60 #include "SourceAlpha.h"
60 #endif 61 #endif
61 62
62 namespace WebCore { 63 namespace WebCore {
63 64
64 static inline void endMatrixRow(Vector<float>& parameters) 65 static inline void endMatrixRow(Vector<float>& parameters)
65 { 66 {
66 parameters.append(0); 67 parameters.append(0);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 134 }
134 135
135 GraphicsContext* FilterEffectRenderer::inputContext() 136 GraphicsContext* FilterEffectRenderer::inputContext()
136 { 137 {
137 return sourceImage() ? sourceImage()->context() : 0; 138 return sourceImage() ? sourceImage()->context() : 0;
138 } 139 }
139 140
140 PassRefPtr<FilterEffect> FilterEffectRenderer::buildReferenceFilter(Document* do cument, PassRefPtr<FilterEffect> previousEffect, ReferenceFilterOperation* op) 141 PassRefPtr<FilterEffect> FilterEffectRenderer::buildReferenceFilter(Document* do cument, PassRefPtr<FilterEffect> previousEffect, ReferenceFilterOperation* op)
141 { 142 {
142 #if ENABLE(SVG) 143 #if ENABLE(SVG)
143 CachedSVGDocument* cachedSVGDocument = static_cast<CachedSVGDocument*>(op->d ata()); 144 CachedSVGDocumentReference* cachedSVGDocumentReference = static_cast<CachedS VGDocumentReference*>(op->data());
145 CachedSVGDocument* cachedSVGDocument = cachedSVGDocumentReference ? cachedSV GDocumentReference->document() : 0;
144 146
145 // If we have an SVG document, this is an external reference. Otherwise 147 // If we have an SVG document, this is an external reference. Otherwise
146 // we look up the referenced node in the current document. 148 // we look up the referenced node in the current document.
147 if (cachedSVGDocument) 149 if (cachedSVGDocument)
148 document = cachedSVGDocument->document(); 150 document = cachedSVGDocument->document();
149 151
150 if (!document) 152 if (!document)
151 return 0; 153 return 0;
152 154
153 Element* filter = document->getElementById(op->fragment()); 155 Element* filter = document->getElementById(op->fragment());
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 m_savedGraphicsContext->drawImageBuffer(filter->output(), m_renderLayer->ren derer()->style()->colorSpace(), pixelSnappedIntRect(destRect), CompositeSourceOv er); 515 m_savedGraphicsContext->drawImageBuffer(filter->output(), m_renderLayer->ren derer()->style()->colorSpace(), pixelSnappedIntRect(destRect), CompositeSourceOv er);
514 516
515 filter->clearIntermediateResults(); 517 filter->clearIntermediateResults();
516 518
517 return m_savedGraphicsContext; 519 return m_savedGraphicsContext;
518 } 520 }
519 521
520 } // namespace WebCore 522 } // namespace WebCore
521 523
522 #endif // ENABLE(CSS_FILTERS) 524 #endif // ENABLE(CSS_FILTERS)
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/filters/FilterOperation.h ('k') | Source/WebCore/rendering/RenderLayerFilterInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698