cc: Include Blink's display list memory usage in rasterize_and_record_micro results.
[chromium-blink-merge.git] / ppapi / proxy / video_frame_resource.h
blobe796eed8d4545947044030b6da00309419888905
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
3 // found in the LICENSE file.
5 #ifndef PPAPI_PROXY_VIDEO_FRAME_RESOURCE_H_
6 #define PPAPI_PROXY_VIDEO_FRAME_RESOURCE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ppapi/proxy/ppapi_proxy_export.h"
11 #include "ppapi/shared_impl/media_stream_buffer.h"
12 #include "ppapi/shared_impl/resource.h"
13 #include "ppapi/thunk/ppb_video_frame_api.h"
15 namespace ppapi {
16 namespace proxy {
18 class PPAPI_PROXY_EXPORT VideoFrameResource : public Resource,
19 public thunk::PPB_VideoFrame_API {
20 public:
21 VideoFrameResource(PP_Instance instance,
22 int32_t index,
23 MediaStreamBuffer* buffer);
25 ~VideoFrameResource() override;
27 // PluginResource overrides:
28 thunk::PPB_VideoFrame_API* AsPPB_VideoFrame_API() override;
30 // PPB_VideoFrame_API overrides:
31 PP_TimeDelta GetTimestamp() override;
32 void SetTimestamp(PP_TimeDelta timestamp) override;
33 PP_VideoFrame_Format GetFormat() override;
34 PP_Bool GetSize(PP_Size* size) override;
35 void* GetDataBuffer() override;
36 uint32_t GetDataBufferSize() override;
37 MediaStreamBuffer* GetBuffer() override;
38 int32_t GetBufferIndex() override;
39 void Invalidate() override;
41 // Frame index
42 int32_t index_;
44 MediaStreamBuffer* buffer_;
46 DISALLOW_COPY_AND_ASSIGN(VideoFrameResource);
49 } // namespace proxy
50 } // namespace ppapi
52 #endif // PPAPI_PROXY_VIDEO_FRAME_RESOURCE_H_