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

Unified Diff: Source/WebCore/rendering/RenderLayer.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/RenderLayer.cpp
diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp
index ae74bfb086d4eed85146c0f0a4da023a14ff006d..c267bd4b09ae25a21d3c87cbb701c0edb274b785 100644
--- a/Source/WebCore/rendering/RenderLayer.cpp
+++ b/Source/WebCore/rendering/RenderLayer.cpp
@@ -116,7 +116,7 @@
#include "SVGNames.h"
#endif
-#if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS)
+#if USE(3D_GRAPHICS)
#include "CustomFilterGlobalContext.h"
#include "CustomFilterOperation.h"
#include "CustomFilterValidatedProgram.h"
@@ -1405,8 +1405,7 @@ void RenderLayer::setFilterBackendNeedsRepaintingInRect(const LayoutRect& rect)
RenderLayerFilterInfo* filterInfo = this->filterInfo();
ASSERT(filterInfo);
filterInfo->expandDirtySourceRect(rectForRepaint);
-
-#if ENABLE(CSS_SHADERS)
+
ASSERT(filterInfo->renderer());
if (filterInfo->renderer()->hasCustomShaderFilter()) {
// If we have at least one custom shader, we need to update the whole bounding box of the layer, because the
@@ -1414,7 +1413,6 @@ void RenderLayer::setFilterBackendNeedsRepaintingInRect(const LayoutRect& rect)
// Note: This is only for output rect, so there's no need to expand the dirty source rect.
rectForRepaint.unite(calculateLayerBounds(this));
}
-#endif
RenderLayer* parentLayer = enclosingFilterRepaintLayer();
ASSERT(parentLayer);
@@ -6180,21 +6178,16 @@ void RenderLayer::updateReflectionStyle()
m_reflection->setStyle(newStyle.release());
}
-#if ENABLE(CSS_SHADERS)
bool RenderLayer::isCSSCustomFilterEnabled() const
{
// We only want to enable shaders if WebGL is also enabled on this platform.
const Settings* settings = renderer()->document()->settings();
return settings && settings->isCSSCustomFilterEnabled() && settings->webGLEnabled();
}
-#endif
#if ENABLE(CSS_FILTERS)
FilterOperations RenderLayer::computeFilterOperations(const RenderStyle* style)
{
-#if !ENABLE(CSS_SHADERS)
- return style->filter();
-#else
const FilterOperations& filters = style->filter();
if (!filters.hasCustomFilter())
return filters;
@@ -6230,7 +6223,6 @@ FilterOperations RenderLayer::computeFilterOperations(const RenderStyle* style)
outputFilters.operations().append(filterOperation.release());
}
return outputFilters;
-#endif
}
void RenderLayer::updateOrRemoveFilterClients()
@@ -6240,12 +6232,10 @@ void RenderLayer::updateOrRemoveFilterClients()
return;
}
-#if ENABLE(CSS_SHADERS)
if (renderer()->style()->filter().hasCustomFilter())
ensureFilterInfo()->updateCustomFilterClients(renderer()->style()->filter());
else if (hasFilterInfo())
filterInfo()->removeCustomFilterClients();
-#endif
#if ENABLE(SVG)
if (renderer()->style()->filter().hasReferenceFilter())

Powered by Google App Engine
This is Rietveld 408576698