Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1185)

Unified Diff: Source/core/paint/Transform3DRecorder.cpp

Issue 1011703005: [Slimming Paint] Allow 3D transforms of different types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: debug strings Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/paint/Transform3DRecorder.cpp
diff --git a/Source/core/paint/Transform3DRecorder.cpp b/Source/core/paint/Transform3DRecorder.cpp
index 22268e65be5d9e8ea5c6c5dc99fbf4807d043be7..fd9cca2957d8ffd10eb8a7316ab0156979addc58 100644
--- a/Source/core/paint/Transform3DRecorder.cpp
+++ b/Source/core/paint/Transform3DRecorder.cpp
@@ -12,10 +12,12 @@
namespace blink {
-Transform3DRecorder::Transform3DRecorder(GraphicsContext& context, DisplayItemClient client, const TransformationMatrix& transform)
+Transform3DRecorder::Transform3DRecorder(GraphicsContext& context, DisplayItemClient client, DisplayItem::Type type, const TransformationMatrix& transform)
: m_context(context)
, m_client(client)
+ , m_type(type)
{
+ ASSERT(DisplayItem::isTransform3DType(type));
m_skipRecordingForIdentityTransform = transform.isIdentity();
if (m_skipRecordingForIdentityTransform)
@@ -23,9 +25,9 @@ Transform3DRecorder::Transform3DRecorder(GraphicsContext& context, DisplayItemCl
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
ASSERT(m_context.displayItemList());
- m_context.displayItemList()->add(BeginTransform3DDisplayItem::create(m_client, transform));
+ m_context.displayItemList()->add(BeginTransform3DDisplayItem::create(m_client, m_type, transform));
} else {
- BeginTransform3DDisplayItem beginTransform(m_client, transform);
+ BeginTransform3DDisplayItem beginTransform(m_client, m_type, transform);
beginTransform.replay(&m_context);
}
}
@@ -35,11 +37,12 @@ Transform3DRecorder::~Transform3DRecorder()
if (m_skipRecordingForIdentityTransform)
return;
+ DisplayItem::Type endType = DisplayItem::transform3DTypeToEndTransform3DType(m_type);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
ASSERT(m_context.displayItemList());
- m_context.displayItemList()->add(EndTransform3DDisplayItem::create(m_client));
+ m_context.displayItemList()->add(EndTransform3DDisplayItem::create(m_client, endType));
} else {
- EndTransform3DDisplayItem endTransform(m_client);
+ EndTransform3DDisplayItem endTransform(m_client, endType);
endTransform.replay(&m_context);
}
}

Powered by Google App Engine
This is Rietveld 408576698