Changeset 111610 in webkit
- Timestamp:
- Mar 21, 2012 3:28:53 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 33 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r111608 r111610 1 2012-03-21 Alexandru Chiculita <achicu@adobe.com> 2 3 [CSS Shaders] Make CSS Shaders compile on Chromium 4 https://bugs.webkit.org/show_bug.cgi?id=81435 5 6 Reviewed by Stephen White. 7 8 I've added window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1") to force 9 enable the feature at runtime. 10 11 I've rebased the expected results for chromium. It seems like the result is a little bit lighter then the old ones. 12 Also, some tests are failing and seem to be related to differences between V8 and JSC: jsWrapperClass returns "Object" and 13 "Function", for "__proto__" and "constructor" properties of the CSSValueList objects. 14 I've let the results keep the "FAIL" status for those particular cases. 15 16 * css3/filters/custom/custom-filter-shader-cache.html: 17 * css3/filters/custom/effect-custom-combined-missing.html: 18 * css3/filters/custom/effect-custom-parameters.html: 19 * css3/filters/custom/effect-custom.html: 20 * css3/filters/custom/missing-custom-filter-shader.html: 21 * css3/filters/script-tests/custom-filter-property-computed-style.js: 22 * css3/filters/script-tests/custom-filter-property-parsing-invalid.js: 23 * css3/filters/script-tests/custom-filter-property-parsing.js: 24 * platform/chromium-linux/css3/filters/custom/custom-filter-property-computed-style-expected.txt: Added. 25 * platform/chromium-linux/css3/filters/custom/custom-filter-property-parsing-expected.txt: Added. 26 * platform/chromium-linux/css3/filters/custom/custom-filter-property-parsing-invalid-expected.txt: Added. 27 * platform/chromium-linux/css3/filters/custom/custom-filter-shader-cache-expected.png: Added. 28 * platform/chromium-linux/css3/filters/custom/custom-filter-shader-cache-expected.txt: Added. 29 * platform/chromium-linux/css3/filters/custom/effect-custom-combined-missing-expected.png: Added. 30 * platform/chromium-linux/css3/filters/custom/effect-custom-combined-missing-expected.txt: Added. 31 * platform/chromium-linux/css3/filters/custom/effect-custom-disabled-expected.txt: Added. 32 * platform/chromium-linux/css3/filters/custom/effect-custom-expected.png: Added. 33 * platform/chromium-linux/css3/filters/custom/effect-custom-expected.txt: Added. 34 * platform/chromium-linux/css3/filters/custom/effect-custom-parameters-expected.png: Added. 35 * platform/chromium-linux/css3/filters/custom/effect-custom-parameters-expected.txt: Added. 36 * platform/chromium-linux/css3/filters/custom/missing-custom-filter-shader-expected.png: Added. 37 * platform/chromium-linux/css3/filters/custom/missing-custom-filter-shader-expected.txt: Added. 38 * platform/chromium-mac/css3/filters/custom/custom-filter-shader-cache-expected.png: Added. 39 * platform/chromium-mac/css3/filters/custom/custom-filter-shader-cache-expected.txt: Added. 40 * platform/chromium-mac/css3/filters/custom/effect-custom-combined-missing-expected.png: Added. 41 * platform/chromium-mac/css3/filters/custom/effect-custom-combined-missing-expected.txt: Added. 42 * platform/chromium-mac/css3/filters/custom/effect-custom-expected.png: Added. 43 * platform/chromium-mac/css3/filters/custom/effect-custom-expected.txt: Added. 44 * platform/chromium-mac/css3/filters/custom/effect-custom-parameters-expected.png: Added. 45 * platform/chromium-mac/css3/filters/custom/effect-custom-parameters-expected.txt: Added. 46 * platform/chromium-mac/css3/filters/custom/filter-repaint-shaders-expected.png: Added. 47 * platform/chromium-mac/css3/filters/custom/filter-repaint-shaders-expected.txt: Added. 48 * platform/chromium-mac/css3/filters/custom/missing-custom-filter-shader-expected.png: Added. 49 * platform/chromium-mac/css3/filters/custom/missing-custom-filter-shader-expected.txt: Added. 50 * platform/chromium/css3/filters/custom/custom-filter-property-computed-style-expected.txt: Added. 51 * platform/chromium/css3/filters/custom/custom-filter-property-parsing-expected.txt: Added. 52 * platform/chromium/css3/filters/custom/custom-filter-property-parsing-invalid-expected.txt: Added. 53 * platform/chromium/css3/filters/custom/effect-custom-disabled-expected.txt: Added. 54 * platform/chromium/test_expectations.txt: I've added Mac and Linux results, so skipping the tests only on Windows. 55 1 56 2012-03-21 Philippe Normand <pnormand@igalia.com> 2 57 -
trunk/LayoutTests/css3/filters/custom/custom-filter-shader-cache.html
r109156 r111610 6 6 <script> 7 7 if (window.layoutTestController) { 8 window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1"); 8 9 window.layoutTestController.overridePreference("WebKitWebGLEnabled", "1"); 9 10 window.layoutTestController.dumpAsText(true); -
trunk/LayoutTests/css3/filters/custom/effect-custom-combined-missing.html
r109156 r111610 5 5 <script> 6 6 if (window.layoutTestController) { 7 window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1"); 7 8 window.layoutTestController.overridePreference("WebKitWebGLEnabled", "1"); 8 // Force software rendering mode.9 window.layoutTestController.overridePreference("WebKitAcceleratedCompositingEnabled", "0");10 9 window.layoutTestController.dumpAsText(true); 11 10 window.layoutTestController.waitUntilDone(); -
trunk/LayoutTests/css3/filters/custom/effect-custom-parameters.html
r109156 r111610 5 5 <script> 6 6 if (window.layoutTestController) { 7 window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1"); 7 8 window.layoutTestController.overridePreference("WebKitWebGLEnabled", "1"); 8 // Force software rendering mode.9 window.layoutTestController.overridePreference("WebKitAcceleratedCompositingEnabled", "0");10 9 window.layoutTestController.dumpAsText(true); 11 10 window.layoutTestController.waitUntilDone(); -
trunk/LayoutTests/css3/filters/custom/effect-custom.html
r109156 r111610 5 5 <script> 6 6 if (window.layoutTestController) { 7 window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1"); 7 8 window.layoutTestController.overridePreference("WebKitWebGLEnabled", "1"); 8 // Force software rendering mode.9 window.layoutTestController.overridePreference("WebKitAcceleratedCompositingEnabled", "0");10 9 window.layoutTestController.dumpAsText(true); 11 10 window.layoutTestController.waitUntilDone(); -
trunk/LayoutTests/css3/filters/custom/missing-custom-filter-shader.html
r109156 r111610 6 6 <script> 7 7 if (window.layoutTestController) { 8 window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1"); 8 9 window.layoutTestController.overridePreference("WebKitWebGLEnabled", "1"); 9 10 window.layoutTestController.dumpAsText(true); -
trunk/LayoutTests/css3/filters/script-tests/custom-filter-property-computed-style.js
r105276 r111610 1 1 description("Tests the computed style of the custom() function of the -webkit-filter property."); 2 3 if (window.layoutTestController) { 4 window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1"); 5 window.layoutTestController.overridePreference("WebKitWebGLEnabled", "1"); 6 } 2 7 3 8 function jsWrapperClass(node) -
trunk/LayoutTests/css3/filters/script-tests/custom-filter-property-parsing-invalid.js
r103535 r111610 1 1 description("Test the parsing of custom() function of the -webkit-filter property."); 2 3 if (window.layoutTestController) { 4 window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1"); 5 window.layoutTestController.overridePreference("WebKitWebGLEnabled", "1"); 6 } 2 7 3 8 // These have to be global for the test helpers to see them. -
trunk/LayoutTests/css3/filters/script-tests/custom-filter-property-parsing.js
r99695 r111610 1 1 description("Test the parsing of the custom() function of the -webkit-filter property."); 2 3 if (window.layoutTestController) { 4 window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1"); 5 window.layoutTestController.overridePreference("WebKitWebGLEnabled", "1"); 6 } 2 7 3 8 function jsWrapperClass(node) -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r111592 r111610 3331 3331 3332 3332 // CSS custom() filters are not currently supported 3333 BUGWK71392 SKIP: css3/filters/custom = FAIL3333 BUGWK71392 WIN : css3/filters/custom = FAIL 3334 3334 3335 3335 // <style scoped> not yet enabled. -
trunk/Source/WebCore/ChangeLog
r111605 r111610 1 2012-03-21 Alexandru Chiculita <achicu@adobe.com> 2 3 [CSS Shaders] Make CSS Shaders compile on Chromium 4 https://bugs.webkit.org/show_bug.cgi?id=81435 5 6 Reviewed by Stephen White. 7 8 This patch enables the CSS Shaders compile time flag, but keeps the runtime flag disabled. 9 The only way to test the functionality now is to use the overridePreference from dump render tree. 10 11 Also part of this patch I fix a layering violation: I removed the "Document" reference from the FECustomFilter.cpp and passed the 12 HostWindow directly. There should be no problem when the HostWindow changes, because the RenderLayer and the FECustomFilter 13 get recreated anyway. 14 15 No new tests. I've updated the existing custom filter tests to run under Chromium and added the expected results. 16 I've just added window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1") to force 17 enable the feature at runtime. 18 19 * loader/cache/CachedResource.cpp: Made CachedResource::ShaderResource report as ResourceRequest::TargetIsSubresource for Chromium. 20 (WebCore::cachedResourceTypeToTargetType): 21 22 * platform/graphics/filters/FECustomFilter.cpp: 23 (WebCore::FECustomFilter::FECustomFilter): Removed Document and just used the HostWindow directly. 24 (WebCore::FECustomFilter::create): 25 (WebCore::FECustomFilter::initializeContext): 26 (WebCore::FECustomFilter::bindVertexAttribute): There was a typo and instead of using the "size" parameter it always used 4 component attribute. 27 Other drivers didn't complain about it, but it was clearly a bug. 28 (WebCore::FECustomFilter::bindProgramAndBuffers): Reading the image back from GPU will flip vertically the framebuffer in Chromium. I've flipped the 29 projection matrix only on Chromium, so that we get the correct result. 30 31 * rendering/FilterEffectRenderer.cpp: 32 (WebCore::FilterEffectRenderer::build): Passing the HostWindow instead of the Document. 33 1 34 2012-03-21 Mark Pilgrim <pilgrim@chromium.org> 2 35 -
trunk/Source/WebCore/loader/cache/CachedResource.cpp
r110023 r111610 107 107 case CachedResource::ImageResource: 108 108 return ResourceRequest::TargetIsImage; 109 #if ENABLE(CSS_SHADERS) 110 case CachedResource::ShaderResource: 111 #endif 109 112 case CachedResource::RawResource: 110 113 return ResourceRequest::TargetIsSubresource; -
trunk/Source/WebCore/platform/graphics/filters/FECustomFilter.cpp
r109838 r111610 33 33 #include "FECustomFilter.h" 34 34 35 #include "CachedShader.h"36 35 #include "CustomFilterMesh.h" 37 36 #include "CustomFilterNumberParameter.h" … … 39 38 #include "CustomFilterProgram.h" 40 39 #include "CustomFilterShader.h" 41 #include "Document.h"42 40 #include "DrawingBuffer.h" 43 #include "FrameView.h"44 41 #include "GraphicsContext3D.h" 45 42 #include "ImageData.h" 46 43 #include "RenderTreeAsText.h" 47 #include "StyleCachedShader.h"48 44 #include "TextStream.h" 49 45 #include "Texture.h" … … 77 73 } 78 74 79 FECustomFilter::FECustomFilter(Filter* filter, Document* document, PassRefPtr<CustomFilterProgram> program, const CustomFilterParameterList& parameters,75 FECustomFilter::FECustomFilter(Filter* filter, HostWindow* hostWindow, PassRefPtr<CustomFilterProgram> program, const CustomFilterParameterList& parameters, 80 76 unsigned meshRows, unsigned meshColumns, CustomFilterOperation::MeshBoxType meshBoxType, 81 77 CustomFilterOperation::MeshType meshType) 82 78 : FilterEffect(filter) 83 , m_ document(document)79 , m_hostWindow(hostWindow) 84 80 , m_program(program) 85 81 , m_parameters(parameters) … … 91 87 } 92 88 93 PassRefPtr<FECustomFilter> FECustomFilter::create(Filter* filter, Document* document, PassRefPtr<CustomFilterProgram> program, const CustomFilterParameterList& parameters,89 PassRefPtr<FECustomFilter> FECustomFilter::create(Filter* filter, HostWindow* hostWindow, PassRefPtr<CustomFilterProgram> program, const CustomFilterParameterList& parameters, 94 90 unsigned meshRows, unsigned meshColumns, CustomFilterOperation::MeshBoxType meshBoxType, 95 91 CustomFilterOperation::MeshType meshType) 96 92 { 97 return adoptRef(new FECustomFilter(filter, document, program, parameters, meshRows, meshColumns, meshBoxType, meshType));93 return adoptRef(new FECustomFilter(filter, hostWindow, program, parameters, meshRows, meshColumns, meshBoxType, meshType)); 98 94 } 99 95 … … 146 142 147 143 ASSERT(!m_context.get()); 148 m_context = GraphicsContext3D::create(attributes, m_ document->view()->root()->hostWindow(), GraphicsContext3D::RenderOffscreen);144 m_context = GraphicsContext3D::create(attributes, m_hostWindow, GraphicsContext3D::RenderOffscreen); 149 145 m_drawingBuffer = DrawingBuffer::create(m_context.get(), contextSize, !attributes.preserveDrawingBuffer); 150 146 … … 168 164 { 169 165 if (attributeLocation != -1) { 170 m_context->vertexAttribPointer(attributeLocation, 4, GraphicsContext3D::FLOAT, false, m_mesh->bytesPerVertex(), offset);166 m_context->vertexAttribPointer(attributeLocation, size, GraphicsContext3D::FLOAT, false, m_mesh->bytesPerVertex(), offset); 171 167 m_context->enableVertexAttribArray(attributeLocation); 172 168 } … … 227 223 if (m_shader->projectionMatrixLocation() != -1) { 228 224 TransformationMatrix projectionMatrix; 225 #if PLATFORM(CHROMIUM) 226 // We flip-y the projection matrix here because Chromium will flip-y the resulting image for us. 227 orthogonalProjectionMatrix(projectionMatrix, -0.5, 0.5, 0.5, -0.5); 228 #else 229 229 orthogonalProjectionMatrix(projectionMatrix, -0.5, 0.5, -0.5, 0.5); 230 #endif 230 231 float glProjectionMatrix[16]; 231 232 projectionMatrix.toColumnMajorFloatArray(glProjectionMatrix); -
trunk/Source/WebCore/platform/graphics/filters/FECustomFilter.h
r108952 r111610 49 49 class CustomFilterProgram; 50 50 class CustomFilterShader; 51 class Document;52 51 class DrawingBuffer; 53 52 class GraphicsContext3D; 53 class HostWindow; 54 54 class IntSize; 55 55 class Texture; … … 57 57 class FECustomFilter : public FilterEffect { 58 58 public: 59 static PassRefPtr<FECustomFilter> create(Filter*, Document*, PassRefPtr<CustomFilterProgram>, const CustomFilterParameterList&,59 static PassRefPtr<FECustomFilter> create(Filter*, HostWindow*, PassRefPtr<CustomFilterProgram>, const CustomFilterParameterList&, 60 60 unsigned meshRows, unsigned meshColumns, CustomFilterOperation::MeshBoxType, 61 61 CustomFilterOperation::MeshType); … … 67 67 68 68 private: 69 FECustomFilter(Filter*, Document*, PassRefPtr<CustomFilterProgram>, const CustomFilterParameterList&,69 FECustomFilter(Filter*, HostWindow*, PassRefPtr<CustomFilterProgram>, const CustomFilterParameterList&, 70 70 unsigned meshRows, unsigned meshColumns, CustomFilterOperation::MeshBoxType, 71 71 CustomFilterOperation::MeshType); … … 78 78 void bindProgramAndBuffers(ByteArray* srcPixelArray); 79 79 80 Document* m_document;80 HostWindow* m_hostWindow; 81 81 82 82 RefPtr<GraphicsContext3D> m_context; -
trunk/Source/WebCore/rendering/FilterEffectRenderer.cpp
r111126 r111610 47 47 #include "CustomFilterOperation.h" 48 48 #include "FECustomFilter.h" 49 #include "FrameView.h" 49 50 #include "Settings.h" 50 51 #endif … … 259 260 program->addClient(this); 260 261 if (program->isLoaded()) { 261 effect = FECustomFilter::create(this, document , program, customFilterOperation->parameters(),262 effect = FECustomFilter::create(this, document->view()->root()->hostWindow(), program, customFilterOperation->parameters(), 262 263 customFilterOperation->meshRows(), customFilterOperation->meshColumns(), 263 264 customFilterOperation->meshBoxType(), customFilterOperation->meshType()); -
trunk/Source/WebKit/chromium/ChangeLog
r111597 r111610 1 2012-03-21 Alexandru Chiculita <achicu@adobe.com> 2 3 [CSS Shaders] Make CSS Shaders compile on Chromium 4 https://bugs.webkit.org/show_bug.cgi?id=81435 5 6 Reviewed by Stephen White. 7 8 I've added the ENABLE_CSS_SHADERS flag by default, but kept CSS Shaders disabled using the runtime flag. 9 10 This change adds a new public API to WebSettings with syntax void setExperimentalCSSCustomFilterEnabled(bool). 11 12 * features.gypi: 13 * public/WebSettings.h: 14 * src/WebSettingsImpl.cpp: 15 (WebKit::WebSettingsImpl::setExperimentalCSSCustomFilterEnabled): 16 (WebKit): 17 * src/WebSettingsImpl.h: 18 (WebSettingsImpl): 19 1 20 2012-03-21 David Reveman <reveman@chromium.org> 2 21 -
trunk/Source/WebKit/chromium/features.gypi
r110595 r111610 38 38 'ENABLE_CHANNEL_MESSAGING=1', 39 39 'ENABLE_CSS_FILTERS=1', 40 'ENABLE_CSS_SHADERS=1', 40 41 'ENABLE_DASHBOARD_SUPPORT=0', 41 42 'ENABLE_DATA_TRANSFER_ITEMS=1', -
trunk/Source/WebKit/chromium/public/WebSettings.h
r109155 r111610 99 99 virtual void setExperimentalWebGLEnabled(bool) = 0; 100 100 virtual void setExperimentalCSSRegionsEnabled(bool) = 0; 101 virtual void setExperimentalCSSCustomFilterEnabled(bool) = 0; 101 102 virtual void setOpenGLMultisamplingEnabled(bool) = 0; 102 103 virtual void setPrivilegedWebGLExtensionsEnabled(bool) = 0; -
trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp
r109155 r111610 299 299 } 300 300 301 void WebSettingsImpl::setExperimentalCSSCustomFilterEnabled(bool enabled) 302 { 303 m_settings->setCSSCustomFilterEnabled(enabled); 304 } 305 301 306 void WebSettingsImpl::setOpenGLMultisamplingEnabled(bool enabled) 302 307 { -
trunk/Source/WebKit/chromium/src/WebSettingsImpl.h
r109155 r111610 91 91 virtual void setExperimentalWebGLEnabled(bool); 92 92 virtual void setExperimentalCSSRegionsEnabled(bool); 93 virtual void setExperimentalCSSCustomFilterEnabled(bool); 93 94 virtual void setOpenGLMultisamplingEnabled(bool); 94 95 virtual void setPrivilegedWebGLExtensionsEnabled(bool); -
trunk/Tools/ChangeLog
r111609 r111610 1 2012-03-21 Alexandru Chiculita <achicu@adobe.com> 2 3 [CSS Shaders] Make CSS Shaders compile on Chromium 4 https://bugs.webkit.org/show_bug.cgi?id=81435 5 6 Reviewed by Stephen White. 7 8 I've added WebKitCSSCustomFilterEnabled support for the layoutTestController.overridePreference function. 9 10 * DumpRenderTree/chromium/LayoutTestController.cpp: 11 (LayoutTestController::overridePreference): 12 * DumpRenderTree/chromium/WebPreferences.cpp: 13 (WebPreferences::reset): 14 (WebPreferences::applyTo): 15 * DumpRenderTree/chromium/WebPreferences.h: 16 (WebPreferences): 17 1 18 2012-03-21 Dirk Pranke <dpranke@chromium.org> 2 19 -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
r111405 r111610 1555 1555 else if (key == "WebKitHixie76WebSocketProtocolEnabled") 1556 1556 prefs->hixie76WebSocketProtocolEnabled = cppVariantToBool(value); 1557 else if (key == "WebKitCSSCustomFilterEnabled") 1558 prefs->cssCustomFilterEnabled = cppVariantToBool(value); 1557 1559 else if (key == "WebKitWebAudioEnabled") { 1558 1560 ASSERT(cppVariantToBool(value)); -
trunk/Tools/DumpRenderTree/chromium/WebPreferences.cpp
r108108 r111610 120 120 perTilePaintingEnabled = false; 121 121 mockScrollbarsEnabled = false; 122 cssCustomFilterEnabled = false; 122 123 } 123 124 … … 196 197 settings->setExperimentalWebGLEnabled(experimentalWebGLEnabled); 197 198 settings->setExperimentalCSSRegionsEnabled(experimentalCSSRegionsEnabled); 199 settings->setExperimentalCSSCustomFilterEnabled(cssCustomFilterEnabled); 198 200 settings->setJavaEnabled(javaEnabled); 199 201 settings->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard); -
trunk/Tools/DumpRenderTree/chromium/WebPreferences.h
r108108 r111610 113 113 bool perTilePaintingEnabled; 114 114 bool mockScrollbarsEnabled; 115 bool cssCustomFilterEnabled; 115 116 116 117 WebPreferences() { reset(); }
Note: See TracChangeset
for help on using the changeset viewer.