2 * Copyright (C) 2015 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include "compositor.h"
22 struct hwc_import_context;
28 class GLCompositor : public Compositor, public Targeting {
31 virtual ~GLCompositor();
34 virtual Targeting *targeting();
35 virtual int CreateTarget(sp<android::GraphicBuffer> &buffer);
36 virtual void SetTarget(int target);
37 virtual void ForgetTarget(int target);
38 virtual Composition *CreateComposition(Importer *importer);
39 virtual int QueueComposition(Composition *composition);
40 virtual int Composite();
44 struct texture_from_handle;
46 struct priv_data *priv_;
50 int GenerateShaders();
51 int DoComposition(GLComposition *composition);
52 int DoFenceWait(int acquireFenceFd);
53 int CreateTextureFromHandle(buffer_handle_t handle,
54 struct texture_from_handle *tex);
55 void DestroyTextureFromHandle(const struct texture_from_handle &tex);
56 void CheckAndDestroyTarget(int target_handle);
61 } // namespace android