Changeset 41780 in webkit
- Timestamp:
- Mar 17, 2009 12:24:35 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r41779 r41780 1 2009-03-17 Simon Fraser <simon.fraser@apple.com> 2 3 Reviewed by Darin Adler 4 5 https://bugs.webkit.org/show_bug.cgi?id=24396 6 7 * config.h: 8 Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now, and add some 9 comments to make the #ifdefs more readable. 10 11 * css/CSSComputedStyleDeclaration.cpp: 12 (WebCore::computedTransform): 13 Add a comment to mention that we don't flatten the matrix. 14 15 * css/MediaQueryEvaluator.cpp: 16 (WebCore::transform_3dMediaFeatureEval): 17 Have the 'transform-3d' media query evaluate to 'true' if 3d-rendering 18 is supported. 19 20 * platform/graphics/mac/GraphicsLayerCA.mm: 21 (WebCore::GraphicsLayerCA::animateTransform): 22 No need for the #ifdef here. If we don't support 3d, we will have already flattened 23 the matrix. 24 25 * platform/graphics/transforms/TransformationMatrix.cpp: 26 (WebCore::TransformationMatrix::makeAffine): 27 * platform/graphics/transforms/TransformationMatrix.h: 28 New method to convert the matrix to an affine matrix by throwing a way the non-affine 29 parts. 30 31 * rendering/RenderLayer.cpp: 32 (WebCore::RenderLayer::updateTransform): 33 (WebCore::RenderLayer::currentTransform): 34 * rendering/RenderLayerBacking.cpp: 35 (WebCore::RenderLayerBacking::updateLayerTransform): 36 If 3d rendering is not supported, convert the matrix to an affine matrix 37 which can be rendered, and used for hit testing. 38 39 * rendering/RenderLayerCompositor.cpp: 40 Change the name of the exported symbol that webkitdirs.pm uses to know if 41 3d rendering is supported. There is no other 3d-rendering-specific symbol we can sniff. 42 43 * rendering/RenderObject.cpp: 44 (WebCore::RenderObject::transformFromContainer): 45 Only take perspective into account if 3d rendering is supported. 46 47 * rendering/RenderObject.h: 48 (WebCore::makeMatrixRenderable): 49 Utility method that flattens a matrix if 3d rendering is not supported. 50 1 51 2009-03-17 Kevin Ollivier <kevino@theolliviers.com> 2 52 -
trunk/WebCore/config.h
r38183 r41780 101 101 102 102 #if PLATFORM(MAC) 103 // ATSUI vs. CoreText 103 104 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) 104 105 #define WTF_USE_ATSUI 0 … … 108 109 #define WTF_USE_CORE_TEXT 0 109 110 #endif 111 112 // New theme 110 113 #define WTF_USE_NEW_THEME 1 114 115 // Accelerated compositing 116 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) 117 #define WTF_USE_ACCELERATED_COMPOSITING 0 111 118 #endif 119 #endif // PLATFORM(MAC) 112 120 113 121 #if PLATFORM(SYMBIAN) -
trunk/WebCore/css/CSSComputedStyleDeclaration.cpp
r41468 r41780 423 423 TransformationMatrix transform; 424 424 style->applyTransform(transform, box.size(), RenderStyle::ExcludeTransformOrigin); 425 // Note that this does not flatten to an affine transform if ENABLE(3D_RENDERING) is off, by design. 425 426 426 427 RefPtr<WebKitCSSTransformValue> transformVal; -
trunk/WebCore/css/MediaQueryEvaluator.cpp
r39880 r41780 418 418 static bool transform_3dMediaFeatureEval(CSSValue* value, RenderStyle*, Frame*, MediaFeaturePrefix op) 419 419 { 420 bool returnValueIfNoParameter; 421 int have3dRendering; 422 423 #if ENABLE(3D_RENDERING) 424 returnValueIfNoParameter = true; 425 have3dRendering = 1; 426 #else 427 returnValueIfNoParameter = false; 428 have3dRendering = 0; 429 #endif 430 420 431 if (value) { 421 432 float number; 422 return numberValue(value, number) && compareValue( 0, static_cast<int>(number), op);423 } 424 return false;433 return numberValue(value, number) && compareValue(have3dRendering, static_cast<int>(number), op); 434 } 435 return returnValueIfNoParameter; 425 436 } 426 437 -
trunk/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
r41397 r41780 947 947 break; 948 948 949 TransformOperation::OperationType opType = 950 #if ENABLE(3D_TRANSFORMS) 951 isMatrixAnimation ? TransformOperation::MATRIX_3D : functionList[functionIndex]; 952 #else 953 isMatrixAnimation ? TransformOperation::MATRIX : functionList[functionIndex]; 954 #endif 949 TransformOperation::OperationType opType = isMatrixAnimation ? TransformOperation::MATRIX_3D : functionList[functionIndex]; 955 950 956 951 if (isKeyframe) { -
trunk/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
r41531 r41780 951 951 } 952 952 953 void TransformationMatrix::makeAffine() 954 { 955 m_matrix[0][2] = 0; 956 m_matrix[0][3] = 0; 957 958 m_matrix[1][2] = 0; 959 m_matrix[1][3] = 0; 960 961 m_matrix[2][0] = 0; 962 m_matrix[2][1] = 0; 963 m_matrix[2][2] = 1; 964 m_matrix[2][3] = 0; 965 966 m_matrix[3][2] = 0; 967 m_matrix[3][3] = 1; 968 } 969 953 970 static inline void blendFloat(double& from, double to, double progress) 954 971 { -
trunk/WebCore/platform/graphics/transforms/TransformationMatrix.h
r41531 r41780 249 249 } 250 250 251 // Throw away the non-affine parts of the matrix (lossy!) 252 void makeAffine(); 253 251 254 bool operator==(const TransformationMatrix& m2) const 252 255 { -
trunk/WebCore/rendering/RenderLayer.cpp
r41637 r41780 330 330 m_transform->makeIdentity(); 331 331 box->style()->applyTransform(*m_transform, box->borderBoxRect().size(), RenderStyle::IncludeTransformOrigin); 332 makeMatrixRenderable(*m_transform); 332 333 } 333 334 … … 346 347 RefPtr<RenderStyle> style = renderer()->animation()->getAnimatedStyleForRenderer(renderer()); 347 348 style->applyTransform(currTransform, renderBox()->borderBoxRect().size(), RenderStyle::IncludeTransformOrigin); 349 makeMatrixRenderable(currTransform); 348 350 return currTransform; 349 351 } -
trunk/WebCore/rendering/RenderLayerBacking.cpp
r41389 r41780 114 114 // baked into it, and we don't want that. 115 115 TransformationMatrix t; 116 if (m_owningLayer->hasTransform()) 116 if (m_owningLayer->hasTransform()) { 117 117 style->applyTransform(t, toRenderBox(renderer())->borderBoxRect().size(), RenderStyle::ExcludeTransformOrigin); 118 makeMatrixRenderable(t); 119 } 118 120 119 121 m_graphicsLayer->setTransform(t); -
trunk/WebCore/rendering/RenderLayerCompositor.cpp
r41531 r41780 50 50 #endif 51 51 52 #if ENABLE(3D_ TRANSFORMS)53 // This symbol is used to determine from a script whether 3D transforms areenabled (via 'nm').54 bool WebCoreHas3D Transforms= true;52 #if ENABLE(3D_RENDERING) 53 // This symbol is used to determine from a script whether 3D rendering is enabled (via 'nm'). 54 bool WebCoreHas3DRendering = true; 55 55 #endif 56 56 -
trunk/WebCore/rendering/RenderObject.cpp
r41769 r41780 1700 1700 containerTransform.multLeft(layer->currentTransform()); 1701 1701 1702 #if ENABLE(3D_RENDERING) 1702 1703 if (containerObject && containerObject->style()->hasPerspective()) { 1703 1704 // Perpsective on the container affects us, so we have to factor it in here. … … 1712 1713 containerTransform.translateRight3d(perspectiveOrigin.x(), perspectiveOrigin.y(), 0); 1713 1714 } 1715 #else 1716 UNUSED_PARAM(containerObject); 1717 #endif 1714 1718 1715 1719 return containerTransform; -
trunk/WebCore/rendering/RenderObject.h
r41769 r41780 912 912 } 913 913 914 inline void makeMatrixRenderable(TransformationMatrix& matrix) 915 { 916 #if !ENABLE(3D_RENDERING) 917 matrix.makeAffine(); 918 #endif 919 } 920 914 921 } // namespace WebCore 915 922 -
trunk/WebKit/mac/ChangeLog
r41764 r41780 1 2009-03-17 Simon Fraser <simon.fraser@apple.com> 2 3 Reviewed by Darin Adler 4 5 https://bugs.webkit.org/show_bug.cgi?id=24396 6 7 Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now. 8 9 * WebKitPrefix.h: 10 1 11 2009-03-17 Kevin Ollivier <kevino@theolliviers.com> 2 12 -
trunk/WebKit/mac/WebKitPrefix.h
r41764 r41780 79 79 #endif 80 80 81 // Accelerated compositing (also needs to be set in WebCore/config.h) 82 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) 83 #define WTF_USE_ACCELERATED_COMPOSITING 0 84 #endif 85 81 86 /* WebKit has no way to pull settings from WebCore/config.h for now */ 82 87 /* so we assume WebKit is always being compiled on top of JavaScriptCore */ -
trunk/WebKitTools/ChangeLog
r41776 r41780 1 2009-03-17 Simon Fraser <simon.fraser@apple.com> 2 3 Reviewed by Darin Adler 4 5 https://bugs.webkit.org/show_bug.cgi?id=24396 6 7 Change the terminology from '3D transforms' to '3D rendering'. 8 9 * Scripts/build-webkit: 10 * Scripts/run-webkit-tests: 11 * Scripts/webkitdirs.pm: 12 1 13 2009-03-17 Gustavo Noronha Silva <gns@gnome.org> 2 14 -
trunk/WebKitTools/Scripts/build-webkit
r41776 r41780 62 62 my $showHelp = 0; 63 63 my $clean = 0; 64 my $threeD TransformsSupport = 0;64 my $threeDRenderingSupport = 0; 65 65 66 66 my $programName = basename($0); … … 72 72 --clean Cleanup the build directory 73 73 --gtk Build the GTK+ port 74 --[no-]3d- transforms Toggle 3D Transforms support (default: $threeDTransformsSupport)74 --[no-]3d-rendering Toggle 3D rendering support (default: $threeDRenderingSupport) 75 75 --[no-]channel-messaging Toggle MessageChannel and MessagePort support (default: $channelMessagingSupport) 76 76 --[no-]offline-web-applications Toggle Offline Web Application Support (default : $offlineWebApplicationSupport) … … 96 96 97 97 GetOptions( 98 '3d- transforms!' => \$threeDTransformsSupport,98 '3d-rendering!' => \$threeDRenderingSupport, 99 99 'channel-messaging!' => \$channelMessagingSupport, 100 100 'database!' => \$databaseSupport, … … 148 148 # and WebKit.xcconfig to prevent needless rebuilding when using both Xcode and build-webkit. 149 149 150 push @overrideFeatureDefinesOption, "ENABLE_3D_ TRANSFORMS" if $threeDTransformsSupport;150 push @overrideFeatureDefinesOption, "ENABLE_3D_RENDERING" if $threeDRenderingSupport; 151 151 push @overrideFeatureDefinesOption, "ENABLE_CHANNEL_MESSAGING" if $channelMessagingSupport; 152 152 push @overrideFeatureDefinesOption, "ENABLE_DATABASE" if $databaseSupport; … … 192 192 push @options, autotoolsFlag($iconDatabaseSupport, "icon-database"); 193 193 push @options, autotoolsFlag($offlineWebApplicationSupport, "offline-web-applications"); 194 push @options, autotoolsFlag($threeD TransformsSupport, "3D-transforms");194 push @options, autotoolsFlag($threeDRenderingSupport, "3D-rendering"); 195 195 push @options, autotoolsFlag($channelMessagingSupport, "channel-messaging"); 196 196 push @options, autotoolsFlag($svgSupport, "svg"); -
trunk/WebKitTools/Scripts/run-webkit-tests
r41702 r41780 366 366 } 367 367 368 if (!checkWebCore3D TransformsSupport(0)) {368 if (!checkWebCore3DRenderingSupport(0)) { 369 369 $ignoredDirectories{'animations/3d'} = 1; 370 370 $ignoredDirectories{'transforms/3d'} = 1; -
trunk/WebKitTools/Scripts/webkitdirs.pm
r41760 r41780 570 570 } 571 571 572 sub has3D TransformsSupport572 sub has3DRenderingSupport 573 573 { 574 574 return 0 if isCygwin() || isQt(); … … 576 576 my $path = shift; 577 577 578 my $has3D TransformsSupport = 0;578 my $has3DRenderingSupport = 0; 579 579 if (-e $path) { 580 580 open NM, "-|", "nm", $path or die; 581 581 while (<NM>) { 582 $has3D TransformsSupport = 1 if /WebCoreHas3DTransforms/;582 $has3DRenderingSupport = 1 if /WebCoreHas3DRendering/; 583 583 } 584 584 close NM; 585 585 } 586 return $has3D TransformsSupport;587 } 588 589 sub checkWebCore3D TransformsSupport586 return $has3DRenderingSupport; 587 } 588 589 sub checkWebCore3DRenderingSupport 590 590 { 591 591 my $required = shift; 592 592 my $framework = "WebCore"; 593 593 my $path = builtDylibPathForName($framework); 594 my $has3D Transforms = has3DTransformsSupport($path);595 if ($required && !$has3D Transforms) {596 die "$framework at \"$path\" does not include 3D Transforms Support, please run build-webkit --3d-transforms\n";597 } 598 return $has3D Transforms;594 my $has3DRendering = has3DRenderingSupport($path); 595 if ($required && !$has3DRendering) { 596 die "$framework at \"$path\" does not include 3D rendering Support, please run build-webkit --3d-rendering\n"; 597 } 598 return $has3DRendering; 599 599 } 600 600
Note: See TracChangeset
for help on using the changeset viewer.