| Index: ppapi/c/private/ppb_graphics_2d_private.h
|
| diff --git a/ppapi/c/private/ppb_graphics_2d_private.h b/ppapi/c/private/ppb_graphics_2d_private.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7959d12fb9362e3f27d4ce738516cd87733df99f
|
| --- /dev/null
|
| +++ b/ppapi/c/private/ppb_graphics_2d_private.h
|
| @@ -0,0 +1,76 @@
|
| +/* 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.
|
| + */
|
| +
|
| +/* From private/ppb_graphics_2d_private.idl,
|
| + * modified Thu Jun 14 16:30:59 2012.
|
| + */
|
| +
|
| +#ifndef PPAPI_C_PRIVATE_PPB_GRAPHICS_2D_PRIVATE_H_
|
| +#define PPAPI_C_PRIVATE_PPB_GRAPHICS_2D_PRIVATE_H_
|
| +
|
| +#include "ppapi/c/pp_bool.h"
|
| +#include "ppapi/c/pp_instance.h"
|
| +#include "ppapi/c/pp_macros.h"
|
| +#include "ppapi/c/pp_resource.h"
|
| +#include "ppapi/c/pp_size.h"
|
| +#include "ppapi/c/pp_stdint.h"
|
| +
|
| +#define PPB_GRAPHICS2D_PRIVATE_INTERFACE_0_1 "PPB_Graphics2D_Private;0.1"
|
| +#define PPB_GRAPHICS2D_PRIVATE_INTERFACE PPB_GRAPHICS2D_PRIVATE_INTERFACE_0_1
|
| +
|
| +/**
|
| + * @file
|
| + * This file contains the <code>PPB_Graphics2D_Private</code> interface. */
|
| +
|
| +
|
| +/**
|
| + * @addtogroup Interfaces
|
| + * @{
|
| + */
|
| +/* PPB_Graphics2D_Private interface */
|
| +struct PPB_Graphics2D_Private_0_1 {
|
| + /**
|
| + * 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)(PP_Instance instance,
|
| + const struct PP_Size* size,
|
| + PP_Bool is_always_opaque,
|
| + float scale);
|
| +};
|
| +
|
| +typedef struct PPB_Graphics2D_Private_0_1 PPB_Graphics2D_Private;
|
| +/**
|
| + * @}
|
| + */
|
| +
|
| +#endif /* PPAPI_C_PRIVATE_PPB_GRAPHICS_2D_PRIVATE_H_ */
|
| +
|
|
|