| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |