Home | History | Annotate | Download | only in compositionengine
      1 /*
      2  * Copyright 2019 The Android Open Source Project
      3  *
      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
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     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.
     15  */
     16 
     17 #pragma once
     18 
     19 #include <utils/RefBase.h>
     20 
     21 namespace android {
     22 
     23 class Fence;
     24 
     25 namespace compositionengine {
     26 
     27 struct LayerFECompositionState;
     28 
     29 // Defines the interface used by the CompositionEngine to make requests
     30 // of the front-end layer
     31 class LayerFE : public virtual RefBase {
     32 public:
     33     // Latches the output-independent state. If includeGeometry is false, the
     34     // geometry state can be skipped.
     35     virtual void latchCompositionState(LayerFECompositionState&, bool includeGeometry) const = 0;
     36 
     37     // Called after the layer is displayed to update the presentation fence
     38     virtual void onLayerDisplayed(const sp<Fence>&) = 0;
     39 
     40     // Gets some kind of identifier for the layer for debug purposes.
     41     virtual const char* getDebugName() const = 0;
     42 };
     43 
     44 } // namespace compositionengine
     45 } // namespace android
     46