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

Unified Diff: public/web/WebGraphicsContext.h

Issue 867063004: [Slimming Paint] Paint the inspector overlay with GraphicsLayer DisplayList. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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: public/web/WebGraphicsContext.h
diff --git a/public/web/WebGraphicsContext.h b/public/web/WebGraphicsContext.h
new file mode 100644
index 0000000000000000000000000000000000000000..30053c6928e7d0ef2f56df65b86ab25a2b4f6929
--- /dev/null
+++ b/public/web/WebGraphicsContext.h
@@ -0,0 +1,27 @@
+// Copyright 2015 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 WebGraphicsContext_h
+#define WebGraphicsContext_h
+
+#include "public/platform/WebCanvas.h"
+#include "public/platform/WebFloatRect.h"
+
+namespace blink {
+
+// Wraps a blink::GraphicsContext.
+// Internal consumers can extract the underlying context (via WebGraphicsContextImpl).
+// External consumers can make a single drawing using a WebCanvas.
+class WebGraphicsContext {
Xianzhu 2015/02/10 23:34:01 Nit: Can we just make it a concrete class (like wr
jbroman 2015/02/11 00:32:54 See reply to pdr's comment.
+public:
+ virtual WebCanvas* beginDrawing(const WebFloatRect& bounds) = 0;
+ virtual void endDrawing() = 0;
+
+protected:
+ ~WebGraphicsContext() { }
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698