Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: ppapi/thunk/resource_creation_api.h

Issue 6905088: New thunk system for Pepper proxy and implementation (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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.
4
5 #ifndef PPAPI_THUNK_RESOURCE_CREATION_API_H_
6 #define PPAPI_THUNK_RESOURCE_CREATION_API_H_
7
8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_resource.h"
11 #include "ppapi/c/ppb_image_data.h"
12 #include "ppapi/proxy/interface_id.h"
13
14 struct PP_Size;
15
16 namespace ppapi {
17 namespace thunk {
18
19 // A functional API for creating resource types. Separating out the creation
20 // functions here allows us to implement most resources as a pure "resource
21 // API", meaning all calls are routed on a per-resource-object basis. The
22 // creationg functions are not per-object (since there's no object during
23 // creation) so need functional routing based on the instance ID.
24 class ResourceCreationAPI {
25 public:
26 static const ::pp::proxy::InterfaceID interface_id =
27 ::pp::proxy::INTERFACE_ID_RESOURCE_CREATION;
28
29 virtual PP_Resource CreateGraphics2D(PP_Instance instance,
30 const PP_Size& size,
31 PP_Bool is_always_opaque) = 0;
32 virtual PP_Resource CreateImageData(PP_Instance instance,
33 PP_ImageDataFormat format,
34 const PP_Size& size,
35 PP_Bool init_to_zero) = 0;
36 };
37
38 } // namespace thunk
39 } // namespace ppapi
40
41 #endif // PPAPI_THUNK_RESOURCE_CREATION_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698