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 "webkit/plugins/ppapi/mock_platform_image_2d.h" | 5 #include "webkit/plugins/ppapi/mock_platform_image_2d.h" |
6 | 6 |
7 #include "skia/ext/platform_canvas.h" | 7 #include "skia/ext/platform_canvas.h" |
8 | 8 |
9 namespace webkit { | 9 namespace webkit { |
10 namespace ppapi { | 10 namespace ppapi { |
11 | 11 |
12 MockPlatformImage2D::MockPlatformImage2D(int width, int height) | 12 MockPlatformImage2D::MockPlatformImage2D(int width, int height) |
13 : width_(width), | 13 : width_(width), |
14 height_(height) { | 14 height_(height) { |
15 } | 15 } |
16 | 16 |
17 MockPlatformImage2D::~MockPlatformImage2D() { | 17 MockPlatformImage2D::~MockPlatformImage2D() { |
18 } | 18 } |
19 | 19 |
20 skia::PlatformCanvas* MockPlatformImage2D::Map() { | 20 skia::PlatformCanvas* MockPlatformImage2D::Map() { |
21 return new skia::PlatformCanvas(width_, height_, true); | 21 return skia::CreatePlatformCanvas(width_, height_, true); |
22 } | 22 } |
23 | 23 |
24 intptr_t MockPlatformImage2D::GetSharedMemoryHandle(uint32* byte_count) const { | 24 intptr_t MockPlatformImage2D::GetSharedMemoryHandle(uint32* byte_count) const { |
25 *byte_count = 0; | 25 *byte_count = 0; |
26 return 0; | 26 return 0; |
27 } | 27 } |
28 | 28 |
29 TransportDIB* MockPlatformImage2D::GetTransportDIB() const { | 29 TransportDIB* MockPlatformImage2D::GetTransportDIB() const { |
30 return NULL; | 30 return NULL; |
31 } | 31 } |
32 | 32 |
33 } // namespace ppapi | 33 } // namespace ppapi |
34 } // namespace webkit | 34 } // namespace webkit |
OLD | NEW |