Changeset 88378 in webkit
- Timestamp:
- Jun 8, 2011 1:07:10 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r88377 r88378 1 2011-06-08 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 WebKit2: Enable serializing of data types needed for cross-process accelerated compositing 6 https://bugs.webkit.org/show_bug.cgi?id=61694 7 8 No new tests, code path is not activated yet. 9 10 * WebCore.xcodeproj/project.pbxproj: Changed the TransformOperation subclassed from "project" to "private" 11 1 12 2011-06-08 Tom Sepez <tsepez@chromium.org> 2 13 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r88343 r88378 1130 1130 49C7BA8D1042F5B10009D447 /* JSDocumentCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C7BA8C1042F5B10009D447 /* JSDocumentCustom.cpp */; }; 1131 1131 49D5DC2B0F423A73008F20FD /* Matrix3DTransformOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49D5DC270F423A73008F20FD /* Matrix3DTransformOperation.cpp */; }; 1132 49D5DC2C0F423A73008F20FD /* Matrix3DTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49D5DC280F423A73008F20FD /* Matrix3DTransformOperation.h */; };1132 49D5DC2C0F423A73008F20FD /* Matrix3DTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49D5DC280F423A73008F20FD /* Matrix3DTransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1133 1133 49D5DC2D0F423A73008F20FD /* PerspectiveTransformOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49D5DC290F423A73008F20FD /* PerspectiveTransformOperation.cpp */; }; 1134 49D5DC2E0F423A73008F20FD /* PerspectiveTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49D5DC2A0F423A73008F20FD /* PerspectiveTransformOperation.h */; };1134 49D5DC2E0F423A73008F20FD /* PerspectiveTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49D5DC2A0F423A73008F20FD /* PerspectiveTransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1135 1135 49E911C30EF86D47009D0CAF /* TransformationMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E911B30EF86D47009D0CAF /* TransformationMatrix.cpp */; }; 1136 1136 49E911C40EF86D47009D0CAF /* TransformationMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911B40EF86D47009D0CAF /* TransformationMatrix.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1137 49E911C50EF86D47009D0CAF /* IdentityTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911B50EF86D47009D0CAF /* IdentityTransformOperation.h */; };1137 49E911C50EF86D47009D0CAF /* IdentityTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911B50EF86D47009D0CAF /* IdentityTransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1138 1138 49E911C60EF86D47009D0CAF /* MatrixTransformOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E911B60EF86D47009D0CAF /* MatrixTransformOperation.cpp */; }; 1139 49E911C70EF86D47009D0CAF /* MatrixTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911B70EF86D47009D0CAF /* MatrixTransformOperation.h */; };1139 49E911C70EF86D47009D0CAF /* MatrixTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911B70EF86D47009D0CAF /* MatrixTransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1140 1140 49E911C80EF86D47009D0CAF /* RotateTransformOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E911B80EF86D47009D0CAF /* RotateTransformOperation.cpp */; }; 1141 49E911C90EF86D47009D0CAF /* RotateTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911B90EF86D47009D0CAF /* RotateTransformOperation.h */; };1141 49E911C90EF86D47009D0CAF /* RotateTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911B90EF86D47009D0CAF /* RotateTransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1142 1142 49E911CA0EF86D47009D0CAF /* ScaleTransformOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E911BA0EF86D47009D0CAF /* ScaleTransformOperation.cpp */; }; 1143 49E911CB0EF86D47009D0CAF /* ScaleTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911BB0EF86D47009D0CAF /* ScaleTransformOperation.h */; };1143 49E911CB0EF86D47009D0CAF /* ScaleTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911BB0EF86D47009D0CAF /* ScaleTransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1144 1144 49E911CC0EF86D47009D0CAF /* SkewTransformOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E911BC0EF86D47009D0CAF /* SkewTransformOperation.cpp */; }; 1145 49E911CD0EF86D47009D0CAF /* SkewTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911BD0EF86D47009D0CAF /* SkewTransformOperation.h */; };1145 49E911CD0EF86D47009D0CAF /* SkewTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911BD0EF86D47009D0CAF /* SkewTransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1146 1146 49E911CE0EF86D47009D0CAF /* TransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911BE0EF86D47009D0CAF /* TransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1147 1147 49E911CF0EF86D47009D0CAF /* TransformOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E911BF0EF86D47009D0CAF /* TransformOperations.cpp */; }; 1148 1148 49E911D00EF86D47009D0CAF /* TransformOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911C00EF86D47009D0CAF /* TransformOperations.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1149 1149 49E911D10EF86D47009D0CAF /* TranslateTransformOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E911C10EF86D47009D0CAF /* TranslateTransformOperation.cpp */; }; 1150 49E911D20EF86D47009D0CAF /* TranslateTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911C20EF86D47009D0CAF /* TranslateTransformOperation.h */; };1150 49E911D20EF86D47009D0CAF /* TranslateTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911C20EF86D47009D0CAF /* TranslateTransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1151 1151 49E912AA0EFAC906009D0CAF /* Animation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E912A50EFAC906009D0CAF /* Animation.cpp */; }; 1152 1152 49E912AB0EFAC906009D0CAF /* Animation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E912A60EFAC906009D0CAF /* Animation.h */; settings = {ATTRIBUTES = (Private, ); }; }; -
trunk/Source/WebKit2/ChangeLog
r88350 r88378 1 2011-06-08 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 WebKit2: Enable serializing of data types needed for cross-process accelerated compositing 6 https://bugs.webkit.org/show_bug.cgi?id=61694 7 8 Add ArgumentCoders for TransformOperation, including all the subclasses, 9 and TransformOperations. 10 11 * Scripts/webkit2/messages.py: 12 * Shared/WebCoreArgumentCoders.h: 13 1 14 2011-06-08 Yael Aharon <yael.aharon@nokia.com> 2 15 -
trunk/Source/WebKit2/Scripts/webkit2/messages.py
r88223 r88378 256 256 'WebCore::CompositionUnderline', 257 257 'WebCore::GrammarDetail', 258 'WebCore::IdentityTransformOperation', 258 259 'WebCore::KeypressCommand', 259 260 'WebCore::Length', 261 'WebCore::MatrixTransformOperation', 262 'WebCore::Matrix3DTransformOperation', 263 'WebCore::PerspectiveTransformOperation', 260 264 'WebCore::PluginInfo', 261 265 'WebCore::PrintInfo', 266 'WebCore::RotateTransformOperation', 267 'WebCore::ScaleTransformOperation', 268 'WebCore::SkewTransformOperation', 262 269 'WebCore::TimingFunction', 263 270 'WebCore::TransformationMatrix', 271 'WebCore::TransformOperation', 272 'WebCore::TransformOperations', 273 'WebCore::TranslateTransformOperation', 264 274 'WebCore::ViewportArguments', 265 275 'WebCore::WindowFeatures', -
trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h
r88223 r88378 42 42 #include <WebCore/FloatRect.h> 43 43 #include <WebCore/GraphicsContext.h> 44 #include <WebCore/IdentityTransformOperation.h> 44 45 #include <WebCore/IntRect.h> 45 46 #include <WebCore/KeyboardEvent.h> 46 47 #include <WebCore/Length.h> 48 #include <WebCore/Matrix3DTransformOperation.h> 49 #include <WebCore/MatrixTransformOperation.h> 50 #include <WebCore/PerspectiveTransformOperation.h> 47 51 #include <WebCore/PluginData.h> 48 52 #include <WebCore/ProtectionSpace.h> 49 53 #include <WebCore/ResourceError.h> 50 54 #include <WebCore/ResourceRequest.h> 55 #include <WebCore/RotateTransformOperation.h> 56 #include <WebCore/ScaleTransformOperation.h> 57 #include <WebCore/SkewTransformOperation.h> 51 58 #include <WebCore/TextCheckerClient.h> 52 59 #include <WebCore/TimingFunction.h> 60 #include <WebCore/TransformOperation.h> 61 #include <WebCore/TransformOperations.h> 53 62 #include <WebCore/TransformationMatrix.h> 63 #include <WebCore/TranslateTransformOperation.h> 54 64 #include <WebCore/ViewportArguments.h> 55 65 #include <WebCore/WindowFeatures.h> … … 69 79 template<> struct ArgumentCoder<WebCore::Length> : SimpleArgumentCoder<WebCore::Length> { }; 70 80 template<> struct ArgumentCoder<WebCore::TransformationMatrix> : SimpleArgumentCoder<WebCore::TransformationMatrix> { }; 81 82 template<> struct ArgumentCoder<WebCore::MatrixTransformOperation> : SimpleArgumentCoder<WebCore::MatrixTransformOperation> { }; 83 template<> struct ArgumentCoder<WebCore::Matrix3DTransformOperation> : SimpleArgumentCoder<WebCore::Matrix3DTransformOperation> { }; 84 template<> struct ArgumentCoder<WebCore::PerspectiveTransformOperation> : SimpleArgumentCoder<WebCore::PerspectiveTransformOperation> { }; 85 template<> struct ArgumentCoder<WebCore::RotateTransformOperation> : SimpleArgumentCoder<WebCore::RotateTransformOperation> { }; 86 template<> struct ArgumentCoder<WebCore::ScaleTransformOperation> : SimpleArgumentCoder<WebCore::ScaleTransformOperation> { }; 87 template<> struct ArgumentCoder<WebCore::SkewTransformOperation> : SimpleArgumentCoder<WebCore::SkewTransformOperation> { }; 88 template<> struct ArgumentCoder<WebCore::TranslateTransformOperation> : SimpleArgumentCoder<WebCore::TranslateTransformOperation> { }; 71 89 72 90 template<> struct ArgumentCoder<WebCore::MimeClassInfo> { … … 560 578 } 561 579 }; 580 581 template<> struct ArgumentCoder<RefPtr<WebCore::TransformOperation> > { 582 template<class T> 583 static bool decodeOperation(ArgumentDecoder* decoder, RefPtr<WebCore::TransformOperation>& operation, PassRefPtr<T> newOperation) 584 { 585 if (!ArgumentCoder<T>::decode(decoder, *newOperation.get())) 586 return false; 587 operation = newOperation.get(); 588 return true; 589 } 590 591 template<class T> 592 static void encodeOperation(ArgumentEncoder* encoder, const WebCore::TransformOperation* operation) 593 { 594 ArgumentCoder<T>::encode(encoder, *static_cast<const T*>(operation)); 595 } 596 597 static void encode(ArgumentEncoder* encoder, const RefPtr<WebCore::TransformOperation>& operation) 598 { 599 // We don't want to encode null-references. 600 ASSERT(operation); 601 602 WebCore::TransformOperation::OperationType type = operation->getOperationType(); 603 encoder->encodeInt32(type); 604 switch (type) { 605 case WebCore::TransformOperation::SCALE: 606 case WebCore::TransformOperation::SCALE_X: 607 case WebCore::TransformOperation::SCALE_Y: 608 case WebCore::TransformOperation::SCALE_Z: 609 case WebCore::TransformOperation::SCALE_3D: 610 encodeOperation<WebCore::ScaleTransformOperation>(encoder, operation.get()); 611 return; 612 613 case WebCore::TransformOperation::TRANSLATE: 614 case WebCore::TransformOperation::TRANSLATE_X: 615 case WebCore::TransformOperation::TRANSLATE_Y: 616 case WebCore::TransformOperation::TRANSLATE_Z: 617 case WebCore::TransformOperation::TRANSLATE_3D: 618 encodeOperation<WebCore::TranslateTransformOperation>(encoder, operation.get()); 619 return; 620 621 case WebCore::TransformOperation::ROTATE: 622 case WebCore::TransformOperation::ROTATE_X: 623 case WebCore::TransformOperation::ROTATE_Y: 624 case WebCore::TransformOperation::ROTATE_3D: 625 encodeOperation<WebCore::RotateTransformOperation>(encoder, operation.get()); 626 return; 627 628 case WebCore::TransformOperation::SKEW: 629 case WebCore::TransformOperation::SKEW_X: 630 case WebCore::TransformOperation::SKEW_Y: 631 encodeOperation<WebCore::SkewTransformOperation>(encoder, operation.get()); 632 return; 633 634 case WebCore::TransformOperation::MATRIX: 635 encodeOperation<WebCore::MatrixTransformOperation>(encoder, operation.get()); 636 return; 637 638 case WebCore::TransformOperation::MATRIX_3D: 639 encodeOperation<WebCore::Matrix3DTransformOperation>(encoder, operation.get()); 640 return; 641 642 case WebCore::TransformOperation::PERSPECTIVE: 643 encodeOperation<WebCore::PerspectiveTransformOperation>(encoder, operation.get()); 644 return; 645 646 case WebCore::TransformOperation::IDENTITY: 647 case WebCore::TransformOperation::NONE: 648 return; 649 } 650 } 651 652 static bool decode(ArgumentDecoder* decoder, RefPtr<WebCore::TransformOperation>& operation) 653 { 654 WebCore::TransformOperation::OperationType type; 655 int typeInt; 656 if (!decoder->decodeInt32(typeInt)) 657 return false; 658 type = static_cast<WebCore::TransformOperation::OperationType>(typeInt); 659 switch (type) { 660 case WebCore::TransformOperation::SCALE: 661 case WebCore::TransformOperation::SCALE_X: 662 case WebCore::TransformOperation::SCALE_Y: 663 case WebCore::TransformOperation::SCALE_Z: 664 case WebCore::TransformOperation::SCALE_3D: 665 return decodeOperation<WebCore::ScaleTransformOperation>(decoder, operation, WebCore::ScaleTransformOperation::create(1.0, 1.0, type)); 666 667 case WebCore::TransformOperation::TRANSLATE: 668 case WebCore::TransformOperation::TRANSLATE_X: 669 case WebCore::TransformOperation::TRANSLATE_Y: 670 case WebCore::TransformOperation::TRANSLATE_Z: 671 case WebCore::TransformOperation::TRANSLATE_3D: 672 return decodeOperation<WebCore::TranslateTransformOperation>(decoder, operation, WebCore::TranslateTransformOperation::create(WebCore::Length(0, WebCore::Fixed), WebCore::Length(0, WebCore::Fixed), type)); 673 674 case WebCore::TransformOperation::ROTATE: 675 case WebCore::TransformOperation::ROTATE_X: 676 case WebCore::TransformOperation::ROTATE_Y: 677 case WebCore::TransformOperation::ROTATE_3D: 678 return decodeOperation<WebCore::RotateTransformOperation>(decoder, operation, WebCore::RotateTransformOperation::create(0.0, type)); 679 680 case WebCore::TransformOperation::SKEW: 681 case WebCore::TransformOperation::SKEW_X: 682 case WebCore::TransformOperation::SKEW_Y: 683 return decodeOperation<WebCore::SkewTransformOperation>(decoder, operation, WebCore::SkewTransformOperation::create(0.0, 0.0, type)); 684 685 case WebCore::TransformOperation::MATRIX: 686 return decodeOperation<WebCore::MatrixTransformOperation>(decoder, operation, WebCore::MatrixTransformOperation::create(WebCore::TransformationMatrix())); 687 688 case WebCore::TransformOperation::MATRIX_3D: 689 return decodeOperation<WebCore::Matrix3DTransformOperation>(decoder, operation, WebCore::Matrix3DTransformOperation::create(WebCore::TransformationMatrix())); 690 691 case WebCore::TransformOperation::PERSPECTIVE: 692 return decodeOperation<WebCore::PerspectiveTransformOperation>(decoder, operation, WebCore::PerspectiveTransformOperation::create(WebCore::Length(0, WebCore::Fixed))); 693 694 case WebCore::TransformOperation::IDENTITY: 695 case WebCore::TransformOperation::NONE: 696 operation = WebCore::IdentityTransformOperation::create(); 697 return true; 698 } 699 700 return false; 701 } 702 }; 703 704 template<> struct ArgumentCoder<WebCore::TransformOperations> { 705 static void encode(ArgumentEncoder* encoder, const WebCore::TransformOperations& operations) 706 { 707 WTF::Vector<RefPtr<WebCore::TransformOperation> > operationsVector = operations.operations(); 708 int size = operationsVector.size(); 709 encoder->encodeInt32(size); 710 for (int i = 0; i < size; ++i) 711 ArgumentCoder<RefPtr<WebCore::TransformOperation> >::encode(encoder, operationsVector[i]); 712 } 713 714 static bool decode(ArgumentDecoder* decoder, WebCore::TransformOperations& operations) 715 { 716 int size; 717 if (!decoder->decodeInt32(size)) 718 return false; 719 720 WTF::Vector<RefPtr<WebCore::TransformOperation> >& operationVector = operations.operations(); 721 operationVector.clear(); 722 operationVector.resize(size); 723 for (int i = 0; i < size; ++i) { 724 RefPtr<WebCore::TransformOperation> operation; 725 if (!ArgumentCoder<RefPtr<WebCore::TransformOperation> >::decode(decoder, operation)) 726 return false; 727 operationVector[i] = operation; 728 } 729 730 return true; 731 } 732 }; 733 562 734 563 735 template<> struct ArgumentCoder<WebCore::Animation> {
Note: See TracChangeset
for help on using the changeset viewer.