OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/renderer/compositor_bindings/web_external_bitmap_impl.h" | 5 #include "cc/blink/web_external_bitmap_impl.h" |
6 | 6 |
7 #include "base/memory/shared_memory.h" | 7 #include "base/memory/shared_memory.h" |
8 | 8 |
9 namespace content { | 9 namespace cc_blink { |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 SharedMemoryAllocationFunction g_memory_allocator; | 13 SharedMemoryAllocationFunction g_memory_allocator; |
14 | 14 |
15 } // namespace | 15 } // namespace |
16 | 16 |
17 void SetSharedMemoryAllocationFunction( | 17 void SetSharedMemoryAllocationFunction( |
18 SharedMemoryAllocationFunction allocator) { | 18 SharedMemoryAllocationFunction allocator) { |
19 g_memory_allocator = allocator; | 19 g_memory_allocator = allocator; |
(...skipping 16 matching lines...) Expand all Loading... |
36 } | 36 } |
37 | 37 |
38 blink::WebSize WebExternalBitmapImpl::size() { | 38 blink::WebSize WebExternalBitmapImpl::size() { |
39 return size_; | 39 return size_; |
40 } | 40 } |
41 | 41 |
42 uint8* WebExternalBitmapImpl::pixels() { | 42 uint8* WebExternalBitmapImpl::pixels() { |
43 return static_cast<uint8*>(shared_memory_->memory()); | 43 return static_cast<uint8*>(shared_memory_->memory()); |
44 } | 44 } |
45 | 45 |
46 } // namespace content | 46 } // namespace cc_blink |
47 | |
OLD | NEW |