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

Side by Side Diff: third_party/WebKit/Source/core/paint/TransformRecorder.cpp

Issue 2713673005: client-goodbye
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/TransformRecorder.h" 5 #include "core/paint/TransformRecorder.h"
6 6
7 #include "platform/graphics/GraphicsContext.h" 7 #include "platform/graphics/GraphicsContext.h"
8 #include "platform/graphics/paint/PaintController.h" 8 #include "platform/graphics/paint/PaintController.h"
9 #include "platform/graphics/paint/TransformDisplayItem.h" 9 #include "platform/graphics/paint/TransformDisplayItem.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 TransformRecorder::TransformRecorder(GraphicsContext& context, 13 TransformRecorder::TransformRecorder(
14 const DisplayItemClient& client, 14 GraphicsContext& context,
15 const AffineTransform& transform) 15 const AffineTransform& transform,
16 : m_context(context), m_client(client) { 16 const LayoutRect& visualRect,
17 const WTF::String& debugName,
18 bool paintedOutputOfObjectHasNoEffectRegardlessOfSize)
19 : m_context(context),
20 m_client(visualRect,
21 debugName,
22 paintedOutputOfObjectHasNoEffectRegardlessOfSize) {
17 m_skipRecordingForIdentityTransform = transform.isIdentity(); 23 m_skipRecordingForIdentityTransform = transform.isIdentity();
18 24
19 if (m_skipRecordingForIdentityTransform) 25 if (m_skipRecordingForIdentityTransform)
20 return; 26 return;
21 27
22 m_context.getPaintController().createAndAppend<BeginTransformDisplayItem>( 28 m_context.getPaintController().createAndAppend<BeginTransformDisplayItem>(
23 m_client, transform); 29 m_client, transform);
24 } 30 }
25 31
26 TransformRecorder::~TransformRecorder() { 32 TransformRecorder::~TransformRecorder() {
27 if (m_skipRecordingForIdentityTransform) 33 if (m_skipRecordingForIdentityTransform)
28 return; 34 return;
29 35
30 m_context.getPaintController().endItem<EndTransformDisplayItem>(m_client); 36 m_context.getPaintController().endItem<EndTransformDisplayItem>(m_client);
31 } 37 }
32 38
33 } // namespace blink 39 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/TransformRecorder.h ('k') | third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698