blob: 1bd0c26dc622d4286591c1a748696722d331e541 [file] [log] [blame]
Fabien Sanglard7b1563a2016-10-13 12:05:28 -07001/*
2 * Copyright (C) 2007 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#ifndef ANDROID_LAYER_REJECTER_H
18#define ANDROID_LAYER_REJECTER_H
19
20#include "Layer.h"
Chia-I Wu0cb75ac2017-11-27 15:56:04 -080021#include "BufferLayerConsumer.h"
Fabien Sanglard7b1563a2016-10-13 12:05:28 -070022
23namespace android {
Chia-I Wu0cb75ac2017-11-27 15:56:04 -080024 class LayerRejecter : public BufferLayerConsumer::BufferRejecter {
Fabien Sanglard7b1563a2016-10-13 12:05:28 -070025 public:
chaviw214c89d2019-09-04 16:03:53 -070026 LayerRejecter(Layer::State &front, Layer::State &current, bool &recomputeVisibleRegions,
27 bool stickySet, const char *name, int32_t overrideScalingMode,
28 bool transformToDisplayInverse);
Fabien Sanglard7b1563a2016-10-13 12:05:28 -070029
30 virtual bool reject(const sp<GraphicBuffer> &buf, const BufferItem &item);
31
32 private:
33 Layer::State &mFront;
34 Layer::State &mCurrent;
35 bool &mRecomputeVisibleRegions;
36 bool mStickyTransformSet;
37 const char *mName;
38 int32_t mOverrideScalingMode;
Robert Carr35f0dda2018-05-03 15:47:23 -070039 bool mTransformToDisplayInverse;
Fabien Sanglard7b1563a2016-10-13 12:05:28 -070040 };
41} // namespace android
42
Robert Carr7bf247e2017-05-18 14:02:49 -070043#endif // ANDROID_LAYER_REJECTER_H