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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/paint/TranslationRecorder.h
diff --git a/Source/core/paint/TranslationRecorder.h b/Source/core/paint/TranslationRecorder.h
new file mode 100644
index 0000000000000000000000000000000000000000..d3b84b746ec36846ec6012ac0e290c47b0e8f9ad
--- /dev/null
+++ b/Source/core/paint/TranslationRecorder.h
@@ -0,0 +1,46 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TranslationRecorder_h
+#define TranslationRecorder_h
+
+#include "core/paint/ViewDisplayList.h"
+#include "platform/geometry/FloatSize.h"
+
+namespace blink {
+
+class GraphicsContext;
+class RenderObject;
+
+class TranslationDisplayItem : public DisplayItem {
+public:
+ TranslationDisplayItem(const FloatSize& translation)
+ // FIXME: Need proper identifier for this display item.
+ : DisplayItem(nullptr, Translation), m_translation(translation) { }
+
+private:
+ virtual void replay(GraphicsContext*) override;
+
+ FloatSize m_translation;
+};
+
+class EndTranslationDisplayItem : public TranslationDisplayItem {
+public:
+ EndTranslationDisplayItem(const FloatSize& translation) : TranslationDisplayItem(-translation) { }
+};
+
+class TranslationRecorder {
+public:
+ explicit TranslationRecorder(RenderObject*, GraphicsContext*, const FloatSize& translation);
+ ~TranslationRecorder();
+
+private:
+ RenderObject* m_renderer;
+ GraphicsContext* m_context;
+ FloatSize m_translation;
+};
+
+} // namespace blink
+
+#endif // TranslationRecorder_h

Powered by Google App Engine
This is Rietveld 408576698