cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / ppapi / api / dev / ppb_buffer_dev.idl
blob0fbc5b8fcebae67db476a99700686188deae20f4
1 /* Copyright (c) 2012 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.
4 */
6 /**
7 * This file defines the <code>PPB_Buffer_Dev</code> interface.
8 */
10 label Chrome {
11 M14 = 0.4
14 interface PPB_Buffer_Dev {
15 /**
16 * Allocates a buffer of the given size in bytes. The return value will have
17 * a non-zero ID on success, or zero on failure. Failure means the module
18 * handle was invalid. The buffer will be initialized to contain zeroes.
20 PP_Resource Create(
21 [in] PP_Instance instance,
22 [in] uint32_t size_in_bytes);
24 /**
25 * Returns PP_TRUE if the given resource is a Buffer. Returns PP_FALSE if the
26 * resource is invalid or some type other than a Buffer.
28 PP_Bool IsBuffer(
29 [in] PP_Resource resource);
31 /**
32 * Gets the size of the buffer. Returns PP_TRUE on success, PP_FALSE
33 * if the resource is not a buffer. On failure, |*size_in_bytes| is not set.
35 PP_Bool Describe(
36 [in] PP_Resource resource,
37 [out] uint32_t size_in_bytes);
39 /**
40 * Maps this buffer into the plugin address space and returns a pointer to
41 * the beginning of the data.
43 mem_t Map(
44 [in] PP_Resource resource);
46 /**
47 * Unmaps this buffer.
49 void Unmap(
50 [in] PP_Resource resource);