Debian Codegraph @

libs/hostgraphics/gui/BufferItem.h

raw symbols SCIP
1 /*
2 * Copyright (C) 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 #ifndef ANDROID_GUI_BUFFERITEM_H
18 #define ANDROID_GUI_BUFFERITEM_H
19
20 #include <ui/Fence.h>
21 #include <ui/Rect.h>
22
23 #include <system/graphics.h>
24
25 #include <utils/StrongPointer.h>
26
27 namespace android {
28
29 class Fence;
30 class GraphicBuffer;
31
32 // The only thing we need here for layoutlib is mGraphicBuffer. The rest of the fields are added
33 // just to satisfy the calls from the android_media_ImageReader.h
34
35 class BufferItem {
36 public:
37 enum { INVALID_BUFFER_SLOT = -1 };
38
39 BufferItem() : mGraphicBuffer(nullptr), mFence(Fence::NO_FENCE) {}
40 ~BufferItem() {}
41
42 sp<GraphicBuffer> mGraphicBuffer;
43
44 sp<Fence> mFence;
45
46 Rect mCrop;
47
48 uint32_t mTransform;
49
50 uint32_t mScalingMode;
51
52 int64_t mTimestamp;
53
54 android_dataspace mDataSpace;
55
56 uint64_t mFrameNumber;
57
58 int mSlot;
59
60 bool mTransformToDisplayInverse;
61 };
62
63 }
64
65 #endif // ANDROID_GUI_BUFFERITEM_H