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 <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 #endif | 379 #endif |
380 } | 380 } |
381 | 381 |
382 int32_t ImageData::GetSharedMemory(int* /* handle */, | 382 int32_t ImageData::GetSharedMemory(int* /* handle */, |
383 uint32_t* /* byte_count */) { | 383 uint32_t* /* byte_count */) { |
384 // Not supported in the proxy (this method is for actually implementing the | 384 // Not supported in the proxy (this method is for actually implementing the |
385 // proxy in the host). | 385 // proxy in the host). |
386 return PP_ERROR_NOACCESS; | 386 return PP_ERROR_NOACCESS; |
387 } | 387 } |
388 | 388 |
389 skia::PlatformCanvas* ImageData::GetPlatformCanvas() { | 389 SkCanvas* ImageData::GetPlatformCanvas() { |
390 #if defined(OS_NACL) | 390 #if defined(OS_NACL) |
391 return NULL; // No canvas in NaCl. | 391 return NULL; // No canvas in NaCl. |
392 #else | 392 #else |
393 return mapped_canvas_.get(); | 393 return mapped_canvas_.get(); |
394 #endif | 394 #endif |
395 } | 395 } |
396 | 396 |
397 SkCanvas* ImageData::GetCanvas() { | 397 SkCanvas* ImageData::GetCanvas() { |
398 #if defined(OS_NACL) | 398 #if defined(OS_NACL) |
399 return NULL; // No canvas in NaCl. | 399 return NULL; // No canvas in NaCl. |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 // still cached in our process, the proxy still holds a reference so we can | 615 // still cached in our process, the proxy still holds a reference so we can |
616 // remove the one the renderer just sent is. If the proxy no longer holds a | 616 // remove the one the renderer just sent is. If the proxy no longer holds a |
617 // reference, we released everything and we should also release the one the | 617 // reference, we released everything and we should also release the one the |
618 // renderer just sent us. | 618 // renderer just sent us. |
619 dispatcher()->Send(new PpapiHostMsg_PPBCore_ReleaseResource( | 619 dispatcher()->Send(new PpapiHostMsg_PPBCore_ReleaseResource( |
620 API_ID_PPB_CORE, old_image_data)); | 620 API_ID_PPB_CORE, old_image_data)); |
621 } | 621 } |
622 | 622 |
623 } // namespace proxy | 623 } // namespace proxy |
624 } // namespace ppapi | 624 } // namespace ppapi |
OLD | NEW |