The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 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 | |
Vishnu Nair | 217d8e6 | 2018-09-12 16:34:49 -0700 | [diff] [blame] | 17 | #define LOG_TAG "LayerState" |
| 18 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 19 | #include <utils/Errors.h> |
Mathias Agopian | c5b2c0b | 2009-05-19 19:08:10 -0700 | [diff] [blame] | 20 | #include <binder/Parcel.h> |
Mathias Agopian | 90ac799 | 2012-02-25 18:48:35 -0800 | [diff] [blame] | 21 | #include <gui/ISurfaceComposerClient.h> |
Andy McFadden | 2adaf04 | 2012-12-18 09:49:45 -0800 | [diff] [blame] | 22 | #include <gui/IGraphicBufferProducer.h> |
Robert Carr | 4cdc58f | 2017-08-23 14:22:20 -0700 | [diff] [blame] | 23 | #include <gui/LayerState.h> |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 24 | |
| 25 | namespace android { |
| 26 | |
| 27 | status_t layer_state_t::write(Parcel& output) const |
| 28 | { |
Mathias Agopian | ac9fa42 | 2013-02-11 16:40:36 -0800 | [diff] [blame] | 29 | output.writeStrongBinder(surface); |
Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [diff] [blame] | 30 | output.writeUint32(what); |
Mathias Agopian | ac9fa42 | 2013-02-11 16:40:36 -0800 | [diff] [blame] | 31 | output.writeFloat(x); |
| 32 | output.writeFloat(y); |
Robert Carr | ae06083 | 2016-11-28 10:51:00 -0800 | [diff] [blame] | 33 | output.writeInt32(z); |
Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [diff] [blame] | 34 | output.writeUint32(w); |
| 35 | output.writeUint32(h); |
| 36 | output.writeUint32(layerStack); |
Mathias Agopian | ac9fa42 | 2013-02-11 16:40:36 -0800 | [diff] [blame] | 37 | output.writeFloat(alpha); |
Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [diff] [blame] | 38 | output.writeUint32(flags); |
| 39 | output.writeUint32(mask); |
Mathias Agopian | ac9fa42 | 2013-02-11 16:40:36 -0800 | [diff] [blame] | 40 | *reinterpret_cast<layer_state_t::matrix22_t *>( |
| 41 | output.writeInplace(sizeof(layer_state_t::matrix22_t))) = matrix; |
Marissa Wall | f58c14b | 2018-07-24 10:50:43 -0700 | [diff] [blame] | 42 | output.write(crop_legacy); |
Marissa Wall | f58c14b | 2018-07-24 10:50:43 -0700 | [diff] [blame] | 43 | output.writeStrongBinder(barrierHandle_legacy); |
Robert Carr | 1db73f6 | 2016-12-21 12:58:51 -0800 | [diff] [blame] | 44 | output.writeStrongBinder(reparentHandle); |
Marissa Wall | f58c14b | 2018-07-24 10:50:43 -0700 | [diff] [blame] | 45 | output.writeUint64(frameNumber_legacy); |
Robert Carr | c3574f7 | 2016-03-24 12:19:32 -0700 | [diff] [blame] | 46 | output.writeInt32(overrideScalingMode); |
Marissa Wall | f58c14b | 2018-07-24 10:50:43 -0700 | [diff] [blame] | 47 | output.writeStrongBinder(IInterface::asBinder(barrierGbp_legacy)); |
Robert Carr | db66e62 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 48 | output.writeStrongBinder(relativeLayerHandle); |
chaviw | 0617894 | 2017-07-27 10:25:59 -0700 | [diff] [blame] | 49 | output.writeStrongBinder(parentHandleForChild); |
chaviw | 13fdc49 | 2017-06-27 12:40:18 -0700 | [diff] [blame] | 50 | output.writeFloat(color.r); |
| 51 | output.writeFloat(color.g); |
| 52 | output.writeFloat(color.b); |
Robert Carr | 2c358bf | 2018-08-08 15:58:15 -0700 | [diff] [blame] | 53 | #ifndef NO_INPUT |
| 54 | inputInfo.write(output); |
| 55 | #endif |
Mathias Agopian | ac9fa42 | 2013-02-11 16:40:36 -0800 | [diff] [blame] | 56 | output.write(transparentRegion); |
Marissa Wall | 61c5862 | 2018-07-18 10:12:20 -0700 | [diff] [blame] | 57 | output.writeUint32(transform); |
| 58 | output.writeBool(transformToDisplayInverse); |
| 59 | output.write(crop); |
| 60 | if (buffer) { |
| 61 | output.writeBool(true); |
| 62 | output.write(*buffer); |
| 63 | } else { |
| 64 | output.writeBool(false); |
| 65 | } |
| 66 | if (acquireFence) { |
| 67 | output.writeBool(true); |
| 68 | output.write(*acquireFence); |
| 69 | } else { |
| 70 | output.writeBool(false); |
| 71 | } |
| 72 | output.writeUint32(static_cast<uint32_t>(dataspace)); |
| 73 | output.write(hdrMetadata); |
| 74 | output.write(surfaceDamageRegion); |
| 75 | output.writeInt32(api); |
| 76 | if (sidebandStream) { |
| 77 | output.writeBool(true); |
| 78 | output.writeNativeHandle(sidebandStream->handle()); |
| 79 | } else { |
| 80 | output.writeBool(false); |
| 81 | } |
| 82 | |
Peiyong Lin | d378863 | 2018-09-18 16:01:31 -0700 | [diff] [blame] | 83 | memcpy(output.writeInplace(16 * sizeof(float)), |
| 84 | colorTransform.asArray(), 16 * sizeof(float)); |
Lucas Dupin | 1b6531c | 2018-07-05 17:18:21 -0700 | [diff] [blame^] | 85 | output.writeFloat(cornerRadius); |
Peiyong Lin | d378863 | 2018-09-18 16:01:31 -0700 | [diff] [blame] | 86 | |
Marissa Wall | c837b5e | 2018-10-12 10:04:44 -0700 | [diff] [blame] | 87 | if (output.writeVectorSize(listenerCallbacks) == NO_ERROR) { |
| 88 | for (const auto& [listener, callbackIds] : listenerCallbacks) { |
| 89 | output.writeStrongBinder(IInterface::asBinder(listener)); |
| 90 | output.writeInt64Vector(callbackIds); |
| 91 | } |
| 92 | } |
| 93 | |
Mathias Agopian | ac9fa42 | 2013-02-11 16:40:36 -0800 | [diff] [blame] | 94 | return NO_ERROR; |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 95 | } |
| 96 | |
| 97 | status_t layer_state_t::read(const Parcel& input) |
| 98 | { |
Mathias Agopian | ac9fa42 | 2013-02-11 16:40:36 -0800 | [diff] [blame] | 99 | surface = input.readStrongBinder(); |
Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [diff] [blame] | 100 | what = input.readUint32(); |
Mathias Agopian | ac9fa42 | 2013-02-11 16:40:36 -0800 | [diff] [blame] | 101 | x = input.readFloat(); |
| 102 | y = input.readFloat(); |
Robert Carr | ae06083 | 2016-11-28 10:51:00 -0800 | [diff] [blame] | 103 | z = input.readInt32(); |
Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [diff] [blame] | 104 | w = input.readUint32(); |
| 105 | h = input.readUint32(); |
| 106 | layerStack = input.readUint32(); |
Mathias Agopian | ac9fa42 | 2013-02-11 16:40:36 -0800 | [diff] [blame] | 107 | alpha = input.readFloat(); |
Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [diff] [blame] | 108 | flags = static_cast<uint8_t>(input.readUint32()); |
| 109 | mask = static_cast<uint8_t>(input.readUint32()); |
Michael Lentine | 8afa1c4 | 2014-10-31 11:10:13 -0700 | [diff] [blame] | 110 | const void* matrix_data = input.readInplace(sizeof(layer_state_t::matrix22_t)); |
| 111 | if (matrix_data) { |
| 112 | matrix = *reinterpret_cast<layer_state_t::matrix22_t const *>(matrix_data); |
| 113 | } else { |
| 114 | return BAD_VALUE; |
| 115 | } |
Marissa Wall | f58c14b | 2018-07-24 10:50:43 -0700 | [diff] [blame] | 116 | input.read(crop_legacy); |
Marissa Wall | f58c14b | 2018-07-24 10:50:43 -0700 | [diff] [blame] | 117 | barrierHandle_legacy = input.readStrongBinder(); |
Robert Carr | 1db73f6 | 2016-12-21 12:58:51 -0800 | [diff] [blame] | 118 | reparentHandle = input.readStrongBinder(); |
Marissa Wall | f58c14b | 2018-07-24 10:50:43 -0700 | [diff] [blame] | 119 | frameNumber_legacy = input.readUint64(); |
Robert Carr | c3574f7 | 2016-03-24 12:19:32 -0700 | [diff] [blame] | 120 | overrideScalingMode = input.readInt32(); |
Marissa Wall | f58c14b | 2018-07-24 10:50:43 -0700 | [diff] [blame] | 121 | barrierGbp_legacy = interface_cast<IGraphicBufferProducer>(input.readStrongBinder()); |
Robert Carr | db66e62 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 122 | relativeLayerHandle = input.readStrongBinder(); |
chaviw | 0617894 | 2017-07-27 10:25:59 -0700 | [diff] [blame] | 123 | parentHandleForChild = input.readStrongBinder(); |
chaviw | 13fdc49 | 2017-06-27 12:40:18 -0700 | [diff] [blame] | 124 | color.r = input.readFloat(); |
| 125 | color.g = input.readFloat(); |
| 126 | color.b = input.readFloat(); |
Robert Carr | 2c358bf | 2018-08-08 15:58:15 -0700 | [diff] [blame] | 127 | |
| 128 | #ifndef NO_INPUT |
| 129 | inputInfo = InputWindowInfo::read(input); |
| 130 | #endif |
| 131 | |
Mathias Agopian | ac9fa42 | 2013-02-11 16:40:36 -0800 | [diff] [blame] | 132 | input.read(transparentRegion); |
Marissa Wall | 61c5862 | 2018-07-18 10:12:20 -0700 | [diff] [blame] | 133 | transform = input.readUint32(); |
| 134 | transformToDisplayInverse = input.readBool(); |
| 135 | input.read(crop); |
| 136 | buffer = new GraphicBuffer(); |
| 137 | if (input.readBool()) { |
| 138 | input.read(*buffer); |
| 139 | } |
| 140 | acquireFence = new Fence(); |
| 141 | if (input.readBool()) { |
| 142 | input.read(*acquireFence); |
| 143 | } |
| 144 | dataspace = static_cast<ui::Dataspace>(input.readUint32()); |
| 145 | input.read(hdrMetadata); |
| 146 | input.read(surfaceDamageRegion); |
| 147 | api = input.readInt32(); |
| 148 | if (input.readBool()) { |
| 149 | sidebandStream = NativeHandle::create(input.readNativeHandle(), true); |
| 150 | } |
| 151 | |
Peiyong Lin | d378863 | 2018-09-18 16:01:31 -0700 | [diff] [blame] | 152 | colorTransform = mat4(static_cast<const float*>(input.readInplace(16 * sizeof(float)))); |
Lucas Dupin | 1b6531c | 2018-07-05 17:18:21 -0700 | [diff] [blame^] | 153 | cornerRadius = input.readFloat(); |
Peiyong Lin | d378863 | 2018-09-18 16:01:31 -0700 | [diff] [blame] | 154 | |
Marissa Wall | c837b5e | 2018-10-12 10:04:44 -0700 | [diff] [blame] | 155 | int32_t listenersSize = input.readInt32(); |
| 156 | for (int32_t i = 0; i < listenersSize; i++) { |
| 157 | auto listener = interface_cast<ITransactionCompletedListener>(input.readStrongBinder()); |
| 158 | std::vector<CallbackId> callbackIds; |
| 159 | input.readInt64Vector(&callbackIds); |
| 160 | listenerCallbacks.emplace_back(listener, callbackIds); |
| 161 | } |
| 162 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 163 | return NO_ERROR; |
| 164 | } |
| 165 | |
Mathias Agopian | 698c087 | 2011-06-28 19:09:31 -0700 | [diff] [blame] | 166 | status_t ComposerState::write(Parcel& output) const { |
Marco Nelissen | 2ea926b | 2014-11-14 08:01:01 -0800 | [diff] [blame] | 167 | output.writeStrongBinder(IInterface::asBinder(client)); |
Mathias Agopian | 698c087 | 2011-06-28 19:09:31 -0700 | [diff] [blame] | 168 | return state.write(output); |
| 169 | } |
| 170 | |
| 171 | status_t ComposerState::read(const Parcel& input) { |
| 172 | client = interface_cast<ISurfaceComposerClient>(input.readStrongBinder()); |
| 173 | return state.read(input); |
| 174 | } |
| 175 | |
Mathias Agopian | 8b33f03 | 2012-07-24 20:43:54 -0700 | [diff] [blame] | 176 | |
Pablo Ceballos | 60d6922 | 2015-08-07 14:47:20 -0700 | [diff] [blame] | 177 | DisplayState::DisplayState() : |
| 178 | what(0), |
| 179 | layerStack(0), |
| 180 | orientation(eOrientationDefault), |
| 181 | viewport(Rect::EMPTY_RECT), |
| 182 | frame(Rect::EMPTY_RECT), |
| 183 | width(0), |
| 184 | height(0) { |
| 185 | } |
| 186 | |
Mathias Agopian | 8b33f03 | 2012-07-24 20:43:54 -0700 | [diff] [blame] | 187 | status_t DisplayState::write(Parcel& output) const { |
Mathias Agopian | e57f292 | 2012-08-09 16:29:12 -0700 | [diff] [blame] | 188 | output.writeStrongBinder(token); |
Marco Nelissen | 2ea926b | 2014-11-14 08:01:01 -0800 | [diff] [blame] | 189 | output.writeStrongBinder(IInterface::asBinder(surface)); |
Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [diff] [blame] | 190 | output.writeUint32(what); |
| 191 | output.writeUint32(layerStack); |
| 192 | output.writeUint32(orientation); |
Mathias Agopian | 8683fca | 2012-08-12 19:37:16 -0700 | [diff] [blame] | 193 | output.write(viewport); |
| 194 | output.write(frame); |
Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [diff] [blame] | 195 | output.writeUint32(width); |
| 196 | output.writeUint32(height); |
Mathias Agopian | 8b33f03 | 2012-07-24 20:43:54 -0700 | [diff] [blame] | 197 | return NO_ERROR; |
| 198 | } |
| 199 | |
| 200 | status_t DisplayState::read(const Parcel& input) { |
Mathias Agopian | e57f292 | 2012-08-09 16:29:12 -0700 | [diff] [blame] | 201 | token = input.readStrongBinder(); |
Andy McFadden | 2adaf04 | 2012-12-18 09:49:45 -0800 | [diff] [blame] | 202 | surface = interface_cast<IGraphicBufferProducer>(input.readStrongBinder()); |
Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [diff] [blame] | 203 | what = input.readUint32(); |
| 204 | layerStack = input.readUint32(); |
| 205 | orientation = input.readUint32(); |
Mathias Agopian | 8683fca | 2012-08-12 19:37:16 -0700 | [diff] [blame] | 206 | input.read(viewport); |
| 207 | input.read(frame); |
Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [diff] [blame] | 208 | width = input.readUint32(); |
| 209 | height = input.readUint32(); |
Mathias Agopian | 8b33f03 | 2012-07-24 20:43:54 -0700 | [diff] [blame] | 210 | return NO_ERROR; |
| 211 | } |
| 212 | |
Robert Carr | 2c5f6d2 | 2017-09-26 12:30:35 -0700 | [diff] [blame] | 213 | void DisplayState::merge(const DisplayState& other) { |
| 214 | if (other.what & eSurfaceChanged) { |
| 215 | what |= eSurfaceChanged; |
| 216 | surface = other.surface; |
| 217 | } |
| 218 | if (other.what & eLayerStackChanged) { |
| 219 | what |= eLayerStackChanged; |
| 220 | layerStack = other.layerStack; |
| 221 | } |
| 222 | if (other.what & eDisplayProjectionChanged) { |
| 223 | what |= eDisplayProjectionChanged; |
| 224 | orientation = other.orientation; |
| 225 | viewport = other.viewport; |
| 226 | frame = other.frame; |
| 227 | } |
| 228 | if (other.what & eDisplaySizeChanged) { |
| 229 | what |= eDisplaySizeChanged; |
| 230 | width = other.width; |
| 231 | height = other.height; |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | void layer_state_t::merge(const layer_state_t& other) { |
| 236 | if (other.what & ePositionChanged) { |
| 237 | what |= ePositionChanged; |
| 238 | x = other.x; |
| 239 | y = other.y; |
| 240 | } |
| 241 | if (other.what & eLayerChanged) { |
| 242 | what |= eLayerChanged; |
| 243 | z = other.z; |
| 244 | } |
| 245 | if (other.what & eSizeChanged) { |
| 246 | what |= eSizeChanged; |
| 247 | w = other.w; |
| 248 | h = other.h; |
| 249 | } |
| 250 | if (other.what & eAlphaChanged) { |
| 251 | what |= eAlphaChanged; |
| 252 | alpha = other.alpha; |
| 253 | } |
| 254 | if (other.what & eMatrixChanged) { |
| 255 | what |= eMatrixChanged; |
| 256 | matrix = other.matrix; |
| 257 | } |
| 258 | if (other.what & eTransparentRegionChanged) { |
| 259 | what |= eTransparentRegionChanged; |
| 260 | transparentRegion = other.transparentRegion; |
| 261 | } |
| 262 | if (other.what & eFlagsChanged) { |
| 263 | what |= eFlagsChanged; |
| 264 | flags = other.flags; |
| 265 | mask = other.mask; |
| 266 | } |
| 267 | if (other.what & eLayerStackChanged) { |
| 268 | what |= eLayerStackChanged; |
| 269 | layerStack = other.layerStack; |
| 270 | } |
Marissa Wall | f58c14b | 2018-07-24 10:50:43 -0700 | [diff] [blame] | 271 | if (other.what & eCropChanged_legacy) { |
| 272 | what |= eCropChanged_legacy; |
| 273 | crop_legacy = other.crop_legacy; |
Robert Carr | 2c5f6d2 | 2017-09-26 12:30:35 -0700 | [diff] [blame] | 274 | } |
Lucas Dupin | 1b6531c | 2018-07-05 17:18:21 -0700 | [diff] [blame^] | 275 | if (other.what & eCornerRadiusChanged) { |
| 276 | what |= eCornerRadiusChanged; |
| 277 | cornerRadius = other.cornerRadius; |
| 278 | } |
Marissa Wall | f58c14b | 2018-07-24 10:50:43 -0700 | [diff] [blame] | 279 | if (other.what & eDeferTransaction_legacy) { |
| 280 | what |= eDeferTransaction_legacy; |
| 281 | barrierHandle_legacy = other.barrierHandle_legacy; |
| 282 | barrierGbp_legacy = other.barrierGbp_legacy; |
| 283 | frameNumber_legacy = other.frameNumber_legacy; |
Robert Carr | 2c5f6d2 | 2017-09-26 12:30:35 -0700 | [diff] [blame] | 284 | } |
Robert Carr | 2c5f6d2 | 2017-09-26 12:30:35 -0700 | [diff] [blame] | 285 | if (other.what & eOverrideScalingModeChanged) { |
| 286 | what |= eOverrideScalingModeChanged; |
| 287 | overrideScalingMode = other.overrideScalingMode; |
| 288 | } |
| 289 | if (other.what & eGeometryAppliesWithResize) { |
| 290 | what |= eGeometryAppliesWithResize; |
| 291 | } |
| 292 | if (other.what & eReparentChildren) { |
| 293 | what |= eReparentChildren; |
| 294 | reparentHandle = other.reparentHandle; |
| 295 | } |
| 296 | if (other.what & eDetachChildren) { |
| 297 | what |= eDetachChildren; |
| 298 | } |
| 299 | if (other.what & eRelativeLayerChanged) { |
| 300 | what |= eRelativeLayerChanged; |
| 301 | z = other.z; |
| 302 | relativeLayerHandle = other.relativeLayerHandle; |
| 303 | } |
| 304 | if (other.what & eReparent) { |
| 305 | what |= eReparent; |
| 306 | parentHandleForChild = other.parentHandleForChild; |
| 307 | } |
chaviw | ca27f25 | 2018-02-06 16:46:39 -0800 | [diff] [blame] | 308 | if (other.what & eDestroySurface) { |
| 309 | what |= eDestroySurface; |
| 310 | } |
Marissa Wall | 61c5862 | 2018-07-18 10:12:20 -0700 | [diff] [blame] | 311 | if (other.what & eTransformChanged) { |
| 312 | what |= eTransformChanged; |
| 313 | transform = other.transform; |
| 314 | } |
| 315 | if (other.what & eTransformToDisplayInverseChanged) { |
| 316 | what |= eTransformToDisplayInverseChanged; |
| 317 | transformToDisplayInverse = other.transformToDisplayInverse; |
| 318 | } |
| 319 | if (other.what & eCropChanged) { |
| 320 | what |= eCropChanged; |
| 321 | crop = other.crop; |
| 322 | } |
| 323 | if (other.what & eBufferChanged) { |
| 324 | what |= eBufferChanged; |
| 325 | buffer = other.buffer; |
| 326 | } |
| 327 | if (other.what & eAcquireFenceChanged) { |
| 328 | what |= eAcquireFenceChanged; |
| 329 | acquireFence = other.acquireFence; |
| 330 | } |
| 331 | if (other.what & eDataspaceChanged) { |
| 332 | what |= eDataspaceChanged; |
| 333 | dataspace = other.dataspace; |
| 334 | } |
| 335 | if (other.what & eHdrMetadataChanged) { |
| 336 | what |= eHdrMetadataChanged; |
| 337 | hdrMetadata = other.hdrMetadata; |
| 338 | } |
| 339 | if (other.what & eSurfaceDamageRegionChanged) { |
| 340 | what |= eSurfaceDamageRegionChanged; |
| 341 | surfaceDamageRegion = other.surfaceDamageRegion; |
| 342 | } |
| 343 | if (other.what & eApiChanged) { |
| 344 | what |= eApiChanged; |
| 345 | api = other.api; |
| 346 | } |
| 347 | if (other.what & eSidebandStreamChanged) { |
| 348 | what |= eSidebandStreamChanged; |
| 349 | sidebandStream = other.sidebandStream; |
| 350 | } |
Peiyong Lin | d378863 | 2018-09-18 16:01:31 -0700 | [diff] [blame] | 351 | if (other.what & eColorTransformChanged) { |
| 352 | what |= eColorTransformChanged; |
| 353 | colorTransform = other.colorTransform; |
| 354 | } |
Marissa Wall | c837b5e | 2018-10-12 10:04:44 -0700 | [diff] [blame] | 355 | if (other.what & eListenerCallbacksChanged) { |
| 356 | what |= eListenerCallbacksChanged; |
| 357 | listenerCallbacks = other.listenerCallbacks; |
| 358 | } |
Robert Carr | d314f16 | 2018-08-15 13:12:42 -0700 | [diff] [blame] | 359 | |
Robert Carr | 2c358bf | 2018-08-08 15:58:15 -0700 | [diff] [blame] | 360 | #ifndef NO_INPUT |
| 361 | if (other.what & eInputInfoChanged) { |
| 362 | what |= eInputInfoChanged; |
| 363 | inputInfo = other.inputInfo; |
| 364 | } |
| 365 | #endif |
| 366 | |
Vishnu Nair | 217d8e6 | 2018-09-12 16:34:49 -0700 | [diff] [blame] | 367 | if ((other.what & what) != other.what) { |
| 368 | ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? " |
| 369 | "other.what=0x%X what=0x%X", |
| 370 | other.what, what); |
Robert Carr | d314f16 | 2018-08-15 13:12:42 -0700 | [diff] [blame] | 371 | } |
Robert Carr | 2c5f6d2 | 2017-09-26 12:30:35 -0700 | [diff] [blame] | 372 | } |
Mathias Agopian | 8b33f03 | 2012-07-24 20:43:54 -0700 | [diff] [blame] | 373 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 374 | }; // namespace android |