OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // From ppb_image_data.idl modified Thu Apr 25 14:42:27 2013. | 5 // From ppb_image_data.idl modified Thu Apr 25 14:42:27 2013. |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
10 #include "ppapi/c/ppb_image_data.h" | 10 #include "ppapi/c/ppb_image_data.h" |
(...skipping 21 matching lines...) Expand all Loading... | |
32 } | 32 } |
33 | 33 |
34 PP_Resource Create(PP_Instance instance, | 34 PP_Resource Create(PP_Instance instance, |
35 PP_ImageDataFormat format, | 35 PP_ImageDataFormat format, |
36 const struct PP_Size* size, | 36 const struct PP_Size* size, |
37 PP_Bool init_to_zero) { | 37 PP_Bool init_to_zero) { |
38 VLOG(4) << "PPB_ImageData::Create()"; | 38 VLOG(4) << "PPB_ImageData::Create()"; |
39 EnterResourceCreation enter(instance); | 39 EnterResourceCreation enter(instance); |
40 if (enter.failed()) | 40 if (enter.failed()) |
41 return 0; | 41 return 0; |
42 return enter.functions()->CreateImageData(instance, | 42 return enter.functions()->CreateImageDataPlatform(instance, |
43 format, | 43 format, |
44 size, | 44 size, |
45 init_to_zero); | 45 init_to_zero); |
dmichael (off chromium)
2013/06/10 18:07:29
I think here you'll need to do conditional compila
bbudge
2013/06/10 23:28:37
Done.
Hopefully it will be a NaCl plugin that act
| |
46 } | 46 } |
47 | 47 |
48 PP_Bool IsImageData(PP_Resource image_data) { | 48 PP_Bool IsImageData(PP_Resource image_data) { |
49 VLOG(4) << "PPB_ImageData::IsImageData()"; | 49 VLOG(4) << "PPB_ImageData::IsImageData()"; |
50 EnterResource<PPB_ImageData_API> enter(image_data, false); | 50 EnterResource<PPB_ImageData_API> enter(image_data, false); |
51 return PP_FromBool(enter.succeeded()); | 51 return PP_FromBool(enter.succeeded()); |
52 } | 52 } |
53 | 53 |
54 PP_Bool Describe(PP_Resource image_data, struct PP_ImageDataDesc* desc) { | 54 PP_Bool Describe(PP_Resource image_data, struct PP_ImageDataDesc* desc) { |
55 VLOG(4) << "PPB_ImageData::Describe()"; | 55 VLOG(4) << "PPB_ImageData::Describe()"; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 }; | 88 }; |
89 | 89 |
90 } // namespace | 90 } // namespace |
91 | 91 |
92 const PPB_ImageData_1_0* GetPPB_ImageData_1_0_Thunk() { | 92 const PPB_ImageData_1_0* GetPPB_ImageData_1_0_Thunk() { |
93 return &g_ppb_imagedata_thunk_1_0; | 93 return &g_ppb_imagedata_thunk_1_0; |
94 } | 94 } |
95 | 95 |
96 } // namespace thunk | 96 } // namespace thunk |
97 } // namespace ppapi | 97 } // namespace ppapi |
OLD | NEW |