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

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

Issue 9192038: Relanding this with fixes to the mac dbg builder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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/ppb_image_data_proxy.h ('k') | ppapi/proxy/resource_creation_proxy.cc » ('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) 2011 The Chromium Authors. All rights reserved. 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 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/ppb_image_data_proxy.h" 5 #include "ppapi/proxy/ppb_image_data_proxy.h"
6 6
7 #include <string.h> // For memcpy 7 #include <string.h> // For memcpy
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // We need to add a method to TransportDIB to release the handles. 70 // We need to add a method to TransportDIB to release the handles.
71 } 71 }
72 72
73 int32_t ImageData::GetSharedMemory(int* /* handle */, 73 int32_t ImageData::GetSharedMemory(int* /* handle */,
74 uint32_t* /* byte_count */) { 74 uint32_t* /* byte_count */) {
75 // Not supported in the proxy (this method is for actually implementing the 75 // Not supported in the proxy (this method is for actually implementing the
76 // proxy in the host). 76 // proxy in the host).
77 return PP_ERROR_NOACCESS; 77 return PP_ERROR_NOACCESS;
78 } 78 }
79 79
80 skia::PlatformCanvas* ImageData::GetPlatformCanvas() {
81 return mapped_canvas_.get();
82 }
83
80 #if defined(OS_WIN) 84 #if defined(OS_WIN)
81 const ImageHandle ImageData::NullHandle = NULL; 85 const ImageHandle ImageData::NullHandle = NULL;
82 #elif defined(OS_MACOSX) 86 #elif defined(OS_MACOSX)
83 const ImageHandle ImageData::NullHandle = ImageHandle(); 87 const ImageHandle ImageData::NullHandle = ImageHandle();
84 #else 88 #else
85 const ImageHandle ImageData::NullHandle = 0; 89 const ImageHandle ImageData::NullHandle = 0;
86 #endif 90 #endif
87 91
88 ImageHandle ImageData::HandleFromInt(int32_t i) { 92 ImageHandle ImageData::HandleFromInt(int32_t i) {
89 #if defined(OS_WIN) 93 #if defined(OS_WIN)
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 ImageHandle ih = ImageData::HandleFromInt(handle); 177 ImageHandle ih = ImageData::HandleFromInt(handle);
174 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false); 178 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false);
175 #else 179 #else
176 *result_image_handle = ImageData::HandleFromInt(handle); 180 *result_image_handle = ImageData::HandleFromInt(handle);
177 #endif 181 #endif
178 } 182 }
179 } 183 }
180 184
181 } // namespace proxy 185 } // namespace proxy
182 } // namespace ppapi 186 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_image_data_proxy.h ('k') | ppapi/proxy/resource_creation_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698