blob: f95f987f5c304ce637d0724670d5ebca3826412b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "webkit/plugins/ppapi/mock_platform_image_2d.h"
#include "skia/ext/platform_canvas.h"
namespace webkit {
namespace ppapi {
MockPlatformImage2D::MockPlatformImage2D(int width, int height)
: width_(width),
height_(height) {
}
MockPlatformImage2D::~MockPlatformImage2D() {
}
skia::PlatformCanvas* MockPlatformImage2D::Map() {
return skia::CreatePlatformCanvas(width_, height_, true);
}
intptr_t MockPlatformImage2D::GetSharedMemoryHandle(uint32* byte_count) const {
*byte_count = 0;
return 0;
}
TransportDIB* MockPlatformImage2D::GetTransportDIB() const {
return NULL;
}
} // namespace ppapi
} // namespace webkit
|