Bug 1156742 Part 16: Add recording and forwarding of Matrix attribute set for Moz2D recording. r=bas
authorBob Owen <bobowencode@gmail.com>
Tue, 05 Jan 2016 10:08:57 +0000
changeset 300719 0b7f1898586916bc550413e4678025abef155057
parent 300718 dda221fc2e37196dc96413b2c6d04b5ae86441fd
child 300720 318888301328d03b717b26036c248bf69420aef2
push id8978
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 14:05:32 +0000
treeherdermozilla-aurora@b9a803752a2c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs1156742
milestone46.0a1
Bug 1156742 Part 16: Add recording and forwarding of Matrix attribute set for Moz2D recording. r=bas
gfx/2d/DrawTargetRecording.cpp
gfx/2d/RecordedEvent.cpp
gfx/2d/RecordedEvent.h
--- a/gfx/2d/DrawTargetRecording.cpp
+++ b/gfx/2d/DrawTargetRecording.cpp
@@ -197,16 +197,17 @@ public:
   FORWARD_SET_ATTRIBUTE(uint32_t, UINT32);
   FORWARD_SET_ATTRIBUTE(Float, FLOAT);
   FORWARD_SET_ATTRIBUTE(const Size&, SIZE);
   FORWARD_SET_ATTRIBUTE(const IntSize&, INTSIZE);
   FORWARD_SET_ATTRIBUTE(const IntPoint&, INTPOINT);
   FORWARD_SET_ATTRIBUTE(const Rect&, RECT);
   FORWARD_SET_ATTRIBUTE(const IntRect&, INTRECT);
   FORWARD_SET_ATTRIBUTE(const Point&, POINT);
+  FORWARD_SET_ATTRIBUTE(const Matrix&, MATRIX);
   FORWARD_SET_ATTRIBUTE(const Matrix5x4&, MATRIX5X4);
   FORWARD_SET_ATTRIBUTE(const Point3D&, POINT3D);
   FORWARD_SET_ATTRIBUTE(const Color&, COLOR);
 
 #undef FORWARD_SET_ATTRIBUTE
 
   virtual void SetAttribute(uint32_t aIndex, const Float* aFloat, uint32_t aSize) override {
     mRecorder->RecordEvent(RecordedFilterNodeSetAttribute(this, aIndex, aFloat, aSize));
--- a/gfx/2d/RecordedEvent.cpp
+++ b/gfx/2d/RecordedEvent.cpp
@@ -1517,16 +1517,17 @@ RecordedFilterNodeSetAttribute::PlayEven
     REPLAY_SET_ATTRIBUTE(uint32_t, UINT32);
     REPLAY_SET_ATTRIBUTE(Float, FLOAT);
     REPLAY_SET_ATTRIBUTE(Size, SIZE);
     REPLAY_SET_ATTRIBUTE(IntSize, INTSIZE);
     REPLAY_SET_ATTRIBUTE(IntPoint, INTPOINT);
     REPLAY_SET_ATTRIBUTE(Rect, RECT);
     REPLAY_SET_ATTRIBUTE(IntRect, INTRECT);
     REPLAY_SET_ATTRIBUTE(Point, POINT);
+    REPLAY_SET_ATTRIBUTE(Matrix, MATRIX);
     REPLAY_SET_ATTRIBUTE(Matrix5x4, MATRIX5X4);
     REPLAY_SET_ATTRIBUTE(Point3D, POINT3D);
     REPLAY_SET_ATTRIBUTE(Color, COLOR);
   case ARGTYPE_FLOAT_ARRAY:
     aTranslator->LookupFilterNode(mNode)->SetAttribute(
       mIndex,
       reinterpret_cast<const Float*>(&mPayload.front()),
       mPayload.size() / sizeof(Float));
--- a/gfx/2d/RecordedEvent.h
+++ b/gfx/2d/RecordedEvent.h
@@ -19,20 +19,20 @@ struct PathOp;
 class PathRecording;
 
 const uint32_t kMagicInt = 0xc001feed;
 
 // A change in major revision means a change in event binary format, causing
 // loss of backwards compatibility. Old streams will not work in a player
 // using a newer major revision. And new streams will not work in a player
 // using an older major revision.
-const uint16_t kMajorRevision = 3;
+const uint16_t kMajorRevision = 4;
 // A change in minor revision means additions of new events. New streams will
 // not play in older players.
-const uint16_t kMinorRevision = 2;
+const uint16_t kMinorRevision = 0;
 
 struct ReferencePtr
 {
   ReferencePtr()
     : mLongPtr(0)
   {}
 
   MOZ_IMPLICIT ReferencePtr(const void* aLongPtr)
@@ -1029,16 +1029,17 @@ public:
     ARGTYPE_BOOL,
     ARGTYPE_FLOAT,
     ARGTYPE_SIZE,
     ARGTYPE_INTSIZE,
     ARGTYPE_INTPOINT,
     ARGTYPE_RECT,
     ARGTYPE_INTRECT,
     ARGTYPE_POINT,
+    ARGTYPE_MATRIX,
     ARGTYPE_MATRIX5X4,
     ARGTYPE_POINT3D,
     ARGTYPE_COLOR,
     ARGTYPE_FLOAT_ARRAY
   };
 
   template<typename T>
   RecordedFilterNodeSetAttribute(FilterNode *aNode, uint32_t aIndex, T aArgument, ArgType aArgType)