| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 1 | /* | 
 | 2 |  * Copyright (C) 2017 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 | #include <layerproto/LayerProtoHeader.h> | 
 | 18 |  | 
| Peiyong Lin | efefaac | 2018-08-17 12:27:51 -0700 | [diff] [blame] | 19 | #include <math/vec4.h> | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 20 | #include <ui/GraphicBuffer.h> | 
 | 21 | #include <ui/Rect.h> | 
 | 22 | #include <ui/Region.h> | 
| Peiyong Lin | efefaac | 2018-08-17 12:27:51 -0700 | [diff] [blame] | 23 | #include <ui/Transform.h> | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 24 |  | 
 | 25 | namespace android { | 
 | 26 | namespace surfaceflinger { | 
 | 27 | class LayerProtoHelper { | 
 | 28 | public: | 
 | 29 |     static void writeToProto(const Rect& rect, RectProto* rectProto); | 
| Yiwei Zhang | 7124ad3 | 2018-02-21 13:02:45 -0800 | [diff] [blame] | 30 |     static void writeToProto(const FloatRect& rect, FloatRectProto* rectProto); | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 31 |     static void writeToProto(const Region& region, RegionProto* regionProto); | 
 | 32 |     static void writeToProto(const half4 color, ColorProto* colorProto); | 
| Peiyong Lin | efefaac | 2018-08-17 12:27:51 -0700 | [diff] [blame] | 33 |     static void writeToProto(const ui::Transform& transform, TransformProto* transformProto); | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 34 |     static void writeToProto(const sp<GraphicBuffer>& buffer, ActiveBufferProto* activeBufferProto); | 
 | 35 | }; | 
 | 36 |  | 
 | 37 | } // namespace surfaceflinger | 
| Yiwei Zhang | 7124ad3 | 2018-02-21 13:02:45 -0800 | [diff] [blame] | 38 | } // namespace android |