Chromium Code Reviews| 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 |