OLD | NEW |
| (Empty) |
1 // Copyright 2015 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. | |
4 | |
5 #ifndef CHROMECAST_RENDERER_MEDIA_HOLE_FRAME_FACTORY_H_ | |
6 #define CHROMECAST_RENDERER_MEDIA_HOLE_FRAME_FACTORY_H_ | |
7 | |
8 #include <GLES2/gl2.h> | |
9 | |
10 #include "base/macros.h" | |
11 #include "base/memory/ref_counted.h" | |
12 #include "gpu/command_buffer/common/mailbox.h" | |
13 #include "gpu/command_buffer/common/sync_token.h" | |
14 | |
15 namespace gfx { | |
16 class Size; | |
17 } | |
18 | |
19 namespace media { | |
20 class GpuVideoAcceleratorFactories; | |
21 class VideoFrame; | |
22 } | |
23 | |
24 namespace chromecast { | |
25 namespace media { | |
26 | |
27 // Creates VideoFrames for CMA - native textures that get turned into | |
28 // transparent holes in the browser compositor using overlay system. | |
29 // All calls (including ctor/dtor) must be on media thread. | |
30 class HoleFrameFactory { | |
31 public: | |
32 explicit HoleFrameFactory( | |
33 ::media::GpuVideoAcceleratorFactories* gpu_factories); | |
34 ~HoleFrameFactory(); | |
35 | |
36 scoped_refptr<::media::VideoFrame> CreateHoleFrame(const gfx::Size& size); | |
37 | |
38 private: | |
39 ::media::GpuVideoAcceleratorFactories* gpu_factories_; | |
40 gpu::Mailbox mailbox_; | |
41 gpu::SyncToken sync_token_; | |
42 GLuint texture_; | |
43 GLuint image_id_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(HoleFrameFactory); | |
46 }; | |
47 | |
48 } // namespace media | |
49 } // namespace chromecast | |
50 | |
51 #endif // CHROMECAST_RENDERER_MEDIA_HOLE_FRAME_FACTORY_H_ | |
OLD | NEW |