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

Side by Side Diff: Source/core/paint/TranslationRecorder.h

Issue 698743002: [WIP] Adding support for <iframe>s to slimming paint. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef TranslationRecorder_h
6 #define TranslationRecorder_h
7
8 #include "core/paint/ViewDisplayList.h"
9 #include "platform/geometry/FloatSize.h"
10
11 namespace blink {
12
13 class GraphicsContext;
14 class RenderObject;
15
16 class TranslationDisplayItem : public DisplayItem {
17 public:
18 TranslationDisplayItem(const FloatSize& translation)
19 // FIXME: Need proper identifier for this display item.
20 : DisplayItem(nullptr, Translation), m_translation(translation) { }
21
22 private:
23 virtual void replay(GraphicsContext*) override;
24
25 FloatSize m_translation;
26 };
27
28 class EndTranslationDisplayItem : public TranslationDisplayItem {
29 public:
30 EndTranslationDisplayItem(const FloatSize& translation) : TranslationDisplay Item(-translation) { }
31 };
32
33 class TranslationRecorder {
34 public:
35 explicit TranslationRecorder(RenderObject*, GraphicsContext*, const FloatSiz e& translation);
36 ~TranslationRecorder();
37
38 private:
39 RenderObject* m_renderer;
40 GraphicsContext* m_context;
41 FloatSize m_translation;
42 };
43
44 } // namespace blink
45
46 #endif // TranslationRecorder_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698