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

Unified Diff: Source/WebCore/rendering/FilterEffectRenderer.cpp

Issue 13839016: Remove CSS_SHADERS compile-time flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/rendering/FilterEffectRenderer.cpp
diff --git a/Source/WebCore/rendering/FilterEffectRenderer.cpp b/Source/WebCore/rendering/FilterEffectRenderer.cpp
index 2de91c4fb1e4cd88d91f8b6a1c54505879539cc1..c23fa5fbc22e68dbaca7bc3e50c16f640d397c8a 100644
--- a/Source/WebCore/rendering/FilterEffectRenderer.cpp
+++ b/Source/WebCore/rendering/FilterEffectRenderer.cpp
@@ -42,7 +42,7 @@
#include <algorithm>
#include <wtf/MathExtras.h>
-#if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS)
+#if USE(3D_GRAPHICS)
#include "CustomFilterGlobalContext.h"
#include "CustomFilterOperation.h"
#include "CustomFilterProgram.h"
@@ -85,7 +85,7 @@ inline bool isFilterSizeValid(FloatRect rect)
return true;
}
-#if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS)
+#if USE(3D_GRAPHICS)
static PassRefPtr<FECustomFilter> createCustomFilterEffect(Filter* filter, Document* document, ValidatedCustomFilterOperation* operation)
{
if (!document)
@@ -104,9 +104,7 @@ static PassRefPtr<FECustomFilter> createCustomFilterEffect(Filter* filter, Docum
FilterEffectRenderer::FilterEffectRenderer()
: m_graphicsBufferAttached(false)
, m_hasFilterThatMovesPixels(false)
-#if ENABLE(CSS_SHADERS)
, m_hasCustomShaderFilter(false)
-#endif
{
setFilterResolution(FloatSize(1, 1));
m_sourceGraphic = SourceGraphic::create(this);
@@ -187,9 +185,7 @@ PassRefPtr<FilterEffect> FilterEffectRenderer::buildReferenceFilter(RenderObject
bool FilterEffectRenderer::build(RenderObject* renderer, const FilterOperations& operations)
{
-#if ENABLE(CSS_SHADERS)
m_hasCustomShaderFilter = false;
-#endif
m_hasFilterThatMovesPixels = operations.hasFilterThatMovesPixels();
if (m_hasFilterThatMovesPixels)
m_outsets = operations.outsets();
@@ -341,7 +337,7 @@ bool FilterEffectRenderer::build(RenderObject* renderer, const FilterOperations&
dropShadowOperation->x(), dropShadowOperation->y(), dropShadowOperation->color(), 1);
break;
}
-#if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS)
+#if USE(3D_GRAPHICS)
case FilterOperation::CUSTOM:
// CUSTOM operations are always converted to VALIDATED_CUSTOM before getting here.
// The conversion happens in RenderLayer::computeFilterOperations.
@@ -423,13 +419,11 @@ void FilterEffectRenderer::apply()
LayoutRect FilterEffectRenderer::computeSourceImageRectForDirtyRect(const LayoutRect& filterBoxRect, const LayoutRect& dirtyRect)
{
-#if ENABLE(CSS_SHADERS)
if (hasCustomShaderFilter()) {
// When we have at least a custom shader in the chain, we need to compute the whole source image, because the shader can
// reference any pixel and we cannot control that.
return filterBoxRect;
}
-#endif
// The result of this function is the area in the "filterBoxRect" that needs to be repainted, so that we fully cover the "dirtyRect".
LayoutRect rectForRepaint = dirtyRect;
if (hasFilterThatMovesPixels()) {

Powered by Google App Engine
This is Rietveld 408576698