1 // Copyright 2015 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.
5 #ifndef WebGraphicsContext_h
6 #define WebGraphicsContext_h
8 #include "public/platform/WebCanvas.h"
9 #include "public/platform/WebFloatRect.h"
13 // Wraps a blink::GraphicsContext.
14 // Internal consumers can extract the underlying context (via WebGraphicsContextImpl).
15 // External consumers can make a single drawing using a WebCanvas.
16 class WebGraphicsContext
{
18 virtual WebCanvas
* beginDrawing(const WebFloatRect
& bounds
) = 0;
19 virtual void endDrawing() = 0;
22 ~WebGraphicsContext() { }