blob: 51859638e325e4a159fb3c02868263bcc26a452f (
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
|
// 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.
#ifndef WEBKIT_PLUGINS_PPAPI_MOCK_PLATFORM_IMAGE_2D_H_
#define WEBKIT_PLUGINS_PPAPI_MOCK_PLATFORM_IMAGE_2D_H_
#include "webkit/plugins/ppapi/plugin_delegate.h"
#include "skia/ext/platform_canvas.h"
namespace webkit {
namespace ppapi {
class MockPlatformImage2D : public PluginDelegate::PlatformImage2D {
public:
MockPlatformImage2D(int width, int height);
virtual ~MockPlatformImage2D();
// PlatformImage2D implementation.
virtual skia::PlatformCanvas* Map() OVERRIDE;
virtual intptr_t GetSharedMemoryHandle(uint32* byte_count) const OVERRIDE;
virtual TransportDIB* GetTransportDIB() const OVERRIDE;
private:
int width_;
int height_;
};
} // namespace ppapi
} // namespace webkit
#endif // WEBKIT_PLUGINS_PPAPI_MOCK_PLATFORM_IMAGE_2D_H_
|