Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Side by Side Diff: webkit/plugins/ppapi/mock_platform_image_2d.cc

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/mock_platform_image_2d.h ('k') | webkit/plugins/ppapi/plugin_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/mock_platform_image_2d.h ('k') | webkit/plugins/ppapi/plugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698