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

Side by Side Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 10790063: PPAPI/NaCl: Make ImageData for NaCl just use shared memory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make PPB_ImageData_API base non-exported Created 8 years, 4 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
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/thunk/ppb_image_data_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "ppapi/proxy/resource_creation_proxy.h" 5 #include "ppapi/proxy/resource_creation_proxy.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/pp_size.h" 8 #include "ppapi/c/pp_size.h"
9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h"
10 #include "ppapi/proxy/file_chooser_resource.h" 10 #include "ppapi/proxy/file_chooser_resource.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 183
184 PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance, 184 PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance,
185 PP_ImageDataFormat format, 185 PP_ImageDataFormat format,
186 const PP_Size& size, 186 const PP_Size& size,
187 PP_Bool init_to_zero) { 187 PP_Bool init_to_zero) {
188 return PPB_ImageData_Proxy::CreateProxyResource(instance, format, size, 188 return PPB_ImageData_Proxy::CreateProxyResource(instance, format, size,
189 init_to_zero); 189 init_to_zero);
190 } 190 }
191 191
192 PP_Resource ResourceCreationProxy::CreateImageDataNaCl(
193 PP_Instance instance,
194 PP_ImageDataFormat format,
195 const PP_Size& size,
196 PP_Bool init_to_zero) {
197 // These really only are different on the host side. On the plugin side, we
198 // always request a "platform" ImageData if we're trusted, or a "NaCl" one
199 // if we're untrusted (see PPB_ImageData_Proxy::CreateProxyResource()).
200 return CreateImageData(instance, format, size, init_to_zero);
201 }
202
192 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, 203 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance,
193 const PP_Size& size, 204 const PP_Size& size,
194 PP_Bool is_always_opaque) { 205 PP_Bool is_always_opaque) {
195 return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size, 206 return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size,
196 is_always_opaque); 207 is_always_opaque);
197 } 208 }
198 209
199 #if !defined(OS_NACL) 210 #if !defined(OS_NACL)
200 PP_Resource ResourceCreationProxy::CreateAudioInput0_1( 211 PP_Resource ResourceCreationProxy::CreateAudioInput0_1(
201 PP_Instance instance, 212 PP_Instance instance,
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 bool ResourceCreationProxy::Send(IPC::Message* msg) { 360 bool ResourceCreationProxy::Send(IPC::Message* msg) {
350 return dispatcher()->Send(msg); 361 return dispatcher()->Send(msg);
351 } 362 }
352 363
353 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 364 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
354 return false; 365 return false;
355 } 366 }
356 367
357 } // namespace proxy 368 } // namespace proxy
358 } // namespace ppapi 369 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/thunk/ppb_image_data_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698