Chromium Code Reviews| Index: ppapi/api/private/ppb_graphics_2d_private.idl |
| diff --git a/ppapi/api/private/ppb_graphics_2d_private.idl b/ppapi/api/private/ppb_graphics_2d_private.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8cb82ef19e0d440e264b8722c2f590844f83a3e9 |
| --- /dev/null |
| +++ b/ppapi/api/private/ppb_graphics_2d_private.idl |
| @@ -0,0 +1,49 @@ |
| +/* Copyright (c) 2012 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. |
| + */ |
| + |
| +/* This file contains the <code>PPB_Graphics2D_Private</code> interface. */ |
| +label Chrome { |
| + M22 = 0.1 |
| +}; |
| + |
| +/* PPB_Graphics2D_Private interface */ |
| +interface PPB_Graphics2D_Private { |
| + /** |
| + * Create() creates a 2D graphics context. The returned graphics context will |
| + * not be bound to the module instance on creation (call BindGraphics() on |
| + * the module instance to bind the returned graphics context to the module |
| + * instance). |
| + * |
| + * @param[in] instance The module instance. |
| + * @param[in] size The size of the graphic context. |
| + * @param[in] is_always_opaque Set the <code>is_always_opaque</code> flag to |
| + * <code>PP_TRUE</code> if you know that you will be painting only opaque |
| + * data to this context. This option will disable blending when compositing |
| + * the module with the web page, which might give higher performance on some |
| + * computers. |
| + * |
| + * If you set <code>is_always_opaque</code>, your alpha channel should always |
| + * be set to 0xFF or there may be painting artifacts. The alpha values |
| + * overwrite the destination alpha values without blending when |
| + * <code>is_always_opaque</code> is true. |
| + * |
| + * @param[in] scale The scaling factor between pixels in this context and |
| + * DIPs. For rendering at device resolution, this will typically be equal to |
| + * the device scale of the view resource passed to DidChangeView. |
| + * For example, if the view resource passed to DidChangeView has a rectangle |
| + * of (w=200, h=100) and a device scale of 2.0, one would call Create with a |
| + * size of (w=400, h=200) and a scaler of 2.0 then treat each pixel in the |
| + * context as a single device pixel. |
| + * |
| + * @return A <code>PP_Resource</code> containing the 2D graphics context if |
| + * successful or 0 if unsuccessful. |
| + */ |
| + PP_Resource Create( |
|
brettw
2012/06/18 21:17:24
This is a bit confusing because normally if I see
Josh Horwich
2012/06/19 02:01:04
Done.
|
| + [in] PP_Instance instance, |
| + [in] PP_Size size, |
| + [in] PP_Bool is_always_opaque, |
| + [in] float_t scale); |
| +}; |
| + |