2 * Copyright (C) 2008 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.
17 #ifndef ANDROID_SF_LAYER_STATE_H
18 #define ANDROID_SF_LAYER_STATE_H
21 #include <sys/types.h>
23 #include <utils/Errors.h>
25 #include <ui/Region.h>
27 #include <gui/ISurface.h>
32 class ISurfaceComposerClient;
34 struct layer_state_t {
37 : surface(0), what(0),
38 x(0), y(0), z(0), w(0), h(0),
39 alpha(0), flags(0), mask(0),
42 matrix.dsdx = matrix.dtdy = 1.0f;
43 matrix.dsdy = matrix.dtdx = 0.0f;
47 status_t write(Parcel& output) const;
48 status_t read(const Parcel& input);
69 // non POD must be last. see write/read
70 Region transparentRegion;
73 struct ComposerState {
74 sp<ISurfaceComposerClient> client;
76 status_t write(Parcel& output) const;
77 status_t read(const Parcel& input);
80 }; // namespace android
82 #endif // ANDROID_SF_LAYER_STATE_H