• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2022 The Android Open Source Project
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expresso or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 #include <atomic>
18 
19 #include <EGL/egl.h>
20 #include <GLES/gl.h>
21 #include <GLES/glext.h>
22 #include <GLES3/gl3.h>
23 
24 #include "Compositor.h"
25 #include "DisplaySurfaceUser.h"
26 #include "TextureDraw.h"
27 
28 namespace gfxstream {
29 namespace gl {
30 
31 class CompositorGl : public Compositor {
32    public:
33     CompositorGl(TextureDraw* textureDraw);
34     virtual ~CompositorGl();
35 
36     CompositionFinishedWaitable compose(const CompositionRequest& compositionRequest) override;
37 
38   private:
39     GLuint m_composeFbo = 0;
40 
41     // Owned by FrameBuffer.
42     TextureDraw* m_textureDraw = nullptr;
43 };
44 
45 }  // namespace gl
46 }  // namespace gfxstream
47