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 #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 11 matching lines...) Expand all Loading... |
22 #include "ppapi/thunk/thunk.h" | 22 #include "ppapi/thunk/thunk.h" |
23 #include "skia/ext/platform_canvas.h" | 23 #include "skia/ext/platform_canvas.h" |
24 #include "ui/gfx/surface/transport_dib.h" | 24 #include "ui/gfx/surface/transport_dib.h" |
25 | 25 |
26 namespace ppapi { | 26 namespace ppapi { |
27 namespace proxy { | 27 namespace proxy { |
28 | 28 |
29 ImageData::ImageData(const HostResource& resource, | 29 ImageData::ImageData(const HostResource& resource, |
30 const PP_ImageDataDesc& desc, | 30 const PP_ImageDataDesc& desc, |
31 ImageHandle handle) | 31 ImageHandle handle) |
32 : Resource(resource), | 32 : Resource(OBJECT_IS_PROXY, resource), |
33 desc_(desc) { | 33 desc_(desc) { |
34 #if defined(OS_WIN) | 34 #if defined(OS_WIN) |
35 transport_dib_.reset(TransportDIB::CreateWithHandle(handle)); | 35 transport_dib_.reset(TransportDIB::CreateWithHandle(handle)); |
36 #else | 36 #else |
37 transport_dib_.reset(TransportDIB::Map(handle)); | 37 transport_dib_.reset(TransportDIB::Map(handle)); |
38 #endif | 38 #endif |
39 } | 39 } |
40 | 40 |
41 ImageData::~ImageData() { | 41 ImageData::~ImageData() { |
42 } | 42 } |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 ImageHandle ih = ImageData::HandleFromInt(handle); | 177 ImageHandle ih = ImageData::HandleFromInt(handle); |
178 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false); | 178 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false); |
179 #else | 179 #else |
180 *result_image_handle = ImageData::HandleFromInt(handle); | 180 *result_image_handle = ImageData::HandleFromInt(handle); |
181 #endif | 181 #endif |
182 } | 182 } |
183 } | 183 } |
184 | 184 |
185 } // namespace proxy | 185 } // namespace proxy |
186 } // namespace ppapi | 186 } // namespace ppapi |
OLD | NEW |