[Mac] Enable CrZombie for subprocesses in release builds.
[chromium-blink-merge.git] / ppapi / thunk / ppb_context_3d_api.h
blobfeeba898d17d986fda609e17ab0e73c493d38649
1 // Copyright (c) 2011 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 PPAPI_THUNK_PPB_CONTEXT_3D_API_H_
6 #define PPAPI_THUNK_PPB_CONTEXT_3D_API_H_
8 #include "ppapi/c/dev/ppb_context_3d_dev.h"
9 #include "ppapi/c/dev/ppb_context_3d_trusted_dev.h"
10 #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h"
12 namespace gpu {
13 namespace gles2 {
14 class GLES2Implementation;
15 } // namespace gles2
16 } // namespace gpu
18 namespace ppapi {
19 namespace thunk {
21 class PPB_Context3D_API {
22 public:
23 virtual ~PPB_Context3D_API() {}
25 // Context3D.
26 virtual int32_t GetAttrib(int32_t attribute, int32_t* value) = 0;
27 virtual int32_t BindSurfaces(PP_Resource draw, PP_Resource read) = 0;
28 virtual int32_t GetBoundSurfaces(PP_Resource* draw, PP_Resource* read) = 0;
30 // Context3DTrusted.
31 virtual PP_Bool InitializeTrusted(int32_t size) = 0;
32 virtual PP_Bool GetRingBuffer(int* shm_handle,
33 uint32_t* shm_size) = 0;
34 virtual PP_Context3DTrustedState GetState() = 0;
35 virtual PP_Bool Flush(int32_t put_offset) = 0;
36 virtual PP_Context3DTrustedState FlushSync(int32_t put_offset) = 0;
37 virtual int32_t CreateTransferBuffer(uint32_t size) = 0;
38 virtual PP_Bool DestroyTransferBuffer(int32_t id) = 0;
39 virtual PP_Bool GetTransferBuffer(int32_t id,
40 int* shm_handle,
41 uint32_t* shm_size) = 0;
42 virtual PP_Context3DTrustedState FlushSyncFast(int32_t put_offset,
43 int32_t last_known_get) = 0;
45 // GLESChromiumTextureMapping.
46 virtual void* MapTexSubImage2DCHROMIUM(GLenum target,
47 GLint level,
48 GLint xoffset,
49 GLint yoffset,
50 GLsizei width,
51 GLsizei height,
52 GLenum format,
53 GLenum type,
54 GLenum access) = 0;
55 virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) = 0;
57 // For binding with OpenGLES interface.
58 virtual gpu::gles2::GLES2Implementation* GetGLES2Impl() = 0;
61 } // namespace thunk
62 } // namespace ppapi
64 #endif // PPAPI_THUNK_PPB_CONTEXT_3D_API_H_