Title: [108674] trunk
- Revision
- 108674
- Author
- [email protected]
- Date
- 2012-02-23 14:05:15 -0800 (Thu, 23 Feb 2012)
Log Message
Source/WebCore: [chromium] Implement drop-shadow() CSS filter on composited layers.
https://bugs.webkit.org/show_bug.cgi?id=79386
Reviewed by James Robinson.
Covered by css3/filters/effect-drop-shadow-hw.html
* platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
(WebCore::CCRenderSurfaceFilters::apply):
* platform/graphics/filters/FilterOperation.h:
(WebCore::DropShadowFilterOperation::movesPixels):
LayoutTests: [chromium] Mark drop-shadow() tests as failing, pending a rebaseline.
https://bugs.webkit.org/show_bug.cgi?id=79386
Reviewed by James Robinson.
* platform/chromium/test_expectations.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (108673 => 108674)
--- trunk/LayoutTests/ChangeLog 2012-02-23 21:52:42 UTC (rev 108673)
+++ trunk/LayoutTests/ChangeLog 2012-02-23 22:05:15 UTC (rev 108674)
@@ -1,3 +1,12 @@
+2012-02-23 Stephen White <[email protected]>
+
+ [chromium] Mark drop-shadow() tests as failing, pending a rebaseline.
+ https://bugs.webkit.org/show_bug.cgi?id=79386
+
+ Reviewed by James Robinson.
+
+ * platform/chromium/test_expectations.txt:
+
2012-02-22 Ryosuke Niwa <[email protected]>
REGRESSION(r99076): WebKit pastes the trailing newline into a single-line text field
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (108673 => 108674)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-02-23 21:52:42 UTC (rev 108673)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-02-23 22:05:15 UTC (rev 108674)
@@ -3063,6 +3063,13 @@
BUGWK71392 : css3/filters/custom-filter-property-parsing.html = FAIL
BUGWK71392 : css3/filters/custom-filter-shader-cache.html = FAIL
+// Need rebaselining after drop-shadows are implemented in compositor.
+BUGWK79386 : css3/filters/effect-drop-shadow-hw.html = FAIL
+BUGWK79386 : css3/filters/filter-animation-from-none-hw.html = FAIL
+BUGWK79386 : css3/filters/filter-animation-from-none-multi-hw.html = FAIL
+BUGWK79386 : css3/filters/filter-animation-hw.html = FAIL
+BUGWK79386 : css3/filters/filter-animation-multi-hw.html = FAIL
+
// <style scoped> not yet enabled.
BUGWK49142 SKIP : fast/css/style-scoped = PASS
Modified: trunk/Source/WebCore/ChangeLog (108673 => 108674)
--- trunk/Source/WebCore/ChangeLog 2012-02-23 21:52:42 UTC (rev 108673)
+++ trunk/Source/WebCore/ChangeLog 2012-02-23 22:05:15 UTC (rev 108674)
@@ -1,3 +1,17 @@
+2012-02-23 Stephen White <[email protected]>
+
+ [chromium] Implement drop-shadow() CSS filter on composited layers.
+ https://bugs.webkit.org/show_bug.cgi?id=79386
+
+ Reviewed by James Robinson.
+
+ Covered by css3/filters/effect-drop-shadow-hw.html
+
+ * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
+ (WebCore::CCRenderSurfaceFilters::apply):
+ * platform/graphics/filters/FilterOperation.h:
+ (WebCore::DropShadowFilterOperation::movesPixels):
+
2012-02-23 Erik Arvidsson <[email protected]>
Add support for InterfaceName in the bindings
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp (108673 => 108674)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp 2012-02-23 21:52:42 UTC (rev 108673)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp 2012-02-23 22:05:15 UTC (rev 108674)
@@ -198,8 +198,8 @@
const FilterOperation* filterOperation = filters.at(i);
// Allocate a destination texture.
GrTextureDesc desc;
- desc.fFlags = kRenderTarget_GrTextureFlagBit;
- desc.fAALevel = kNone_GrAALevel;
+ desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit;
+ desc.fSampleCnt = 0;
desc.fWidth = size.width();
desc.fHeight = size.height();
desc.fConfig = kRGBA_8888_GrPixelConfig;
@@ -280,6 +280,20 @@
canvas.restore();
break;
}
+ case FilterOperation::DROP_SHADOW: {
+ const DropShadowFilterOperation* op = static_cast<const DropShadowFilterOperation*>(filterOperation);
+ SkAutoTUnref<SkImageFilter> blurFilter(new SkBlurImageFilter(op->stdDeviation(), op->stdDeviation()));
+ SkAutoTUnref<SkColorFilter> colorFilter(SkColorFilter::CreateModeFilter(op->color().rgb(), SkXfermode::kSrcIn_Mode));
+ SkPaint paint;
+ paint.setImageFilter(blurFilter.get());
+ paint.setColorFilter(colorFilter.get());
+ paint.setXfermodeMode(SkXfermode::kSrcOver_Mode);
+ canvas.saveLayer(0, &paint);
+ canvas.drawBitmap(source, op->x(), -op->y());
+ canvas.restore();
+ canvas.drawBitmap(source, 0, 0);
+ break;
+ }
case FilterOperation::PASSTHROUGH:
default:
canvas.drawBitmap(source, 0, 0);
Modified: trunk/Source/WebCore/platform/graphics/filters/FilterOperation.h (108673 => 108674)
--- trunk/Source/WebCore/platform/graphics/filters/FilterOperation.h 2012-02-23 21:52:42 UTC (rev 108673)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterOperation.h 2012-02-23 22:05:15 UTC (rev 108674)
@@ -311,6 +311,7 @@
Color color() const { return m_color; }
virtual bool affectsOpacity() const { return true; }
+ virtual bool movesPixels() const { return true; }
virtual PassRefPtr<FilterOperation> blend(const FilterOperation* from, double progress, bool blendToPassthrough = false);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes