| 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 |  */ | 
| chaviw | 5bf9d68 | 2017-10-25 16:31:08 -0700 | [diff] [blame] | 16 | #include <android-base/stringprintf.h> | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 17 | #include <layerproto/LayerProtoParser.h> | 
| chaviw | 5bf9d68 | 2017-10-25 16:31:08 -0700 | [diff] [blame] | 18 | #include <ui/DebugUtils.h> | 
 | 19 |  | 
 | 20 | using android::base::StringAppendF; | 
 | 21 | using android::base::StringPrintf; | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 22 |  | 
 | 23 | namespace android { | 
 | 24 | namespace surfaceflinger { | 
| chaviw | 5bf9d68 | 2017-10-25 16:31:08 -0700 | [diff] [blame] | 25 |  | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 26 | bool sortLayers(LayerProtoParser::Layer* lhs, const LayerProtoParser::Layer* rhs) { | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 27 |     uint32_t ls = lhs->layerStack; | 
 | 28 |     uint32_t rs = rhs->layerStack; | 
 | 29 |     if (ls != rs) return ls < rs; | 
 | 30 |  | 
| Robert Carr | 83f8e4d | 2017-11-15 14:37:37 -0800 | [diff] [blame] | 31 |     int32_t lz = lhs->z; | 
 | 32 |     int32_t rz = rhs->z; | 
 | 33 |     if (lz != rz) { | 
 | 34 |         return (lz > rz) ? 1 : -1; | 
 | 35 |     } | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 36 |  | 
 | 37 |     return lhs->id < rhs->id; | 
 | 38 | } | 
 | 39 |  | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 40 | bool sortLayerUniquePtrs(const std::unique_ptr<LayerProtoParser::Layer>& lhs, | 
 | 41 |                    const std::unique_ptr<LayerProtoParser::Layer>& rhs) { | 
 | 42 |     return sortLayers(lhs.get(), rhs.get()); | 
 | 43 | } | 
 | 44 |  | 
| Yiwei Zhang | 068e31b | 2018-02-21 13:02:45 -0800 | [diff] [blame] | 45 | const LayerProtoParser::LayerGlobal LayerProtoParser::generateLayerGlobalInfo( | 
 | 46 |         const LayersProto& layersProto) { | 
| Yiwei Zhang | 7c64f17 | 2018-03-07 14:52:28 -0800 | [diff] [blame] | 47 |     LayerGlobal layerGlobal; | 
 | 48 |     layerGlobal.resolution = {layersProto.resolution().w(), layersProto.resolution().h()}; | 
 | 49 |     layerGlobal.colorMode = layersProto.color_mode(); | 
 | 50 |     layerGlobal.colorTransform = layersProto.color_transform(); | 
 | 51 |     layerGlobal.globalTransform = layersProto.global_transform(); | 
 | 52 |     return layerGlobal; | 
| Yiwei Zhang | 068e31b | 2018-02-21 13:02:45 -0800 | [diff] [blame] | 53 | } | 
 | 54 |  | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 55 | std::vector<std::unique_ptr<LayerProtoParser::Layer>> LayerProtoParser::generateLayerTree( | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 56 |         const LayersProto& layersProto) { | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 57 |     std::unordered_map<int32_t, LayerProtoParser::Layer*> layerMap = generateMap(layersProto); | 
 | 58 |     std::vector<std::unique_ptr<LayerProtoParser::Layer>> layers; | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 59 |  | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 60 |     for (std::pair<int32_t, Layer*> kv : layerMap) { | 
 | 61 |         if (kv.second->parent == nullptr) { | 
 | 62 |             // Make unique_ptr for top level layers since they are not children. This ensures there | 
 | 63 |             // will only be one unique_ptr made for each layer. | 
 | 64 |             layers.push_back(std::unique_ptr<Layer>(kv.second)); | 
 | 65 |         } | 
 | 66 |     } | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 67 |  | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 68 |     std::sort(layers.begin(), layers.end(), sortLayerUniquePtrs); | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 69 |     return layers; | 
 | 70 | } | 
 | 71 |  | 
 | 72 | std::unordered_map<int32_t, LayerProtoParser::Layer*> LayerProtoParser::generateMap( | 
 | 73 |         const LayersProto& layersProto) { | 
 | 74 |     std::unordered_map<int32_t, Layer*> layerMap; | 
 | 75 |  | 
 | 76 |     for (int i = 0; i < layersProto.layers_size(); i++) { | 
 | 77 |         const LayerProto& layerProto = layersProto.layers(i); | 
 | 78 |         layerMap[layerProto.id()] = generateLayer(layerProto); | 
 | 79 |     } | 
 | 80 |  | 
 | 81 |     for (int i = 0; i < layersProto.layers_size(); i++) { | 
 | 82 |         const LayerProto& layerProto = layersProto.layers(i); | 
 | 83 |         updateChildrenAndRelative(layerProto, layerMap); | 
 | 84 |     } | 
 | 85 |  | 
 | 86 |     return layerMap; | 
 | 87 | } | 
 | 88 |  | 
 | 89 | LayerProtoParser::Layer* LayerProtoParser::generateLayer(const LayerProto& layerProto) { | 
 | 90 |     Layer* layer = new Layer(); | 
 | 91 |     layer->id = layerProto.id(); | 
 | 92 |     layer->name = layerProto.name(); | 
 | 93 |     layer->type = layerProto.type(); | 
 | 94 |     layer->transparentRegion = generateRegion(layerProto.transparent_region()); | 
 | 95 |     layer->visibleRegion = generateRegion(layerProto.visible_region()); | 
 | 96 |     layer->damageRegion = generateRegion(layerProto.damage_region()); | 
 | 97 |     layer->layerStack = layerProto.layer_stack(); | 
 | 98 |     layer->z = layerProto.z(); | 
 | 99 |     layer->position = {layerProto.position().x(), layerProto.position().y()}; | 
 | 100 |     layer->requestedPosition = {layerProto.requested_position().x(), | 
 | 101 |                                 layerProto.requested_position().y()}; | 
 | 102 |     layer->size = {layerProto.size().w(), layerProto.size().h()}; | 
 | 103 |     layer->crop = generateRect(layerProto.crop()); | 
 | 104 |     layer->finalCrop = generateRect(layerProto.final_crop()); | 
 | 105 |     layer->isOpaque = layerProto.is_opaque(); | 
 | 106 |     layer->invalidate = layerProto.invalidate(); | 
 | 107 |     layer->dataspace = layerProto.dataspace(); | 
 | 108 |     layer->pixelFormat = layerProto.pixel_format(); | 
 | 109 |     layer->color = {layerProto.color().r(), layerProto.color().g(), layerProto.color().b(), | 
 | 110 |                     layerProto.color().a()}; | 
 | 111 |     layer->requestedColor = {layerProto.requested_color().r(), layerProto.requested_color().g(), | 
 | 112 |                              layerProto.requested_color().b(), layerProto.requested_color().a()}; | 
 | 113 |     layer->flags = layerProto.flags(); | 
 | 114 |     layer->transform = generateTransform(layerProto.transform()); | 
 | 115 |     layer->requestedTransform = generateTransform(layerProto.requested_transform()); | 
 | 116 |     layer->activeBuffer = generateActiveBuffer(layerProto.active_buffer()); | 
 | 117 |     layer->queuedFrames = layerProto.queued_frames(); | 
 | 118 |     layer->refreshPending = layerProto.refresh_pending(); | 
| Yiwei Zhang | 068e31b | 2018-02-21 13:02:45 -0800 | [diff] [blame] | 119 |     layer->hwcFrame = generateRect(layerProto.hwc_frame()); | 
 | 120 |     layer->hwcCrop = generateFloatRect(layerProto.hwc_crop()); | 
 | 121 |     layer->hwcTransform = layerProto.hwc_transform(); | 
| rongliu | ccd3484 | 2018-03-14 12:26:23 -0700 | [diff] [blame] | 122 |     layer->windowType = layerProto.window_type(); | 
 | 123 |     layer->appId = layerProto.app_id(); | 
| Yiwei Zhang | 7c64f17 | 2018-03-07 14:52:28 -0800 | [diff] [blame] | 124 |     layer->hwcCompositionType = layerProto.hwc_composition_type(); | 
 | 125 |     layer->isProtected = layerProto.is_protected(); | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 126 |  | 
 | 127 |     return layer; | 
 | 128 | } | 
 | 129 |  | 
 | 130 | LayerProtoParser::Region LayerProtoParser::generateRegion(const RegionProto& regionProto) { | 
 | 131 |     LayerProtoParser::Region region; | 
 | 132 |     region.id = regionProto.id(); | 
 | 133 |     for (int i = 0; i < regionProto.rect_size(); i++) { | 
 | 134 |         const RectProto& rectProto = regionProto.rect(i); | 
 | 135 |         region.rects.push_back(generateRect(rectProto)); | 
 | 136 |     } | 
 | 137 |  | 
 | 138 |     return region; | 
 | 139 | } | 
 | 140 |  | 
 | 141 | LayerProtoParser::Rect LayerProtoParser::generateRect(const RectProto& rectProto) { | 
 | 142 |     LayerProtoParser::Rect rect; | 
 | 143 |     rect.left = rectProto.left(); | 
 | 144 |     rect.top = rectProto.top(); | 
 | 145 |     rect.right = rectProto.right(); | 
 | 146 |     rect.bottom = rectProto.bottom(); | 
 | 147 |  | 
 | 148 |     return rect; | 
 | 149 | } | 
 | 150 |  | 
| Yiwei Zhang | 068e31b | 2018-02-21 13:02:45 -0800 | [diff] [blame] | 151 | LayerProtoParser::FloatRect LayerProtoParser::generateFloatRect(const FloatRectProto& rectProto) { | 
 | 152 |     LayerProtoParser::FloatRect rect; | 
 | 153 |     rect.left = rectProto.left(); | 
 | 154 |     rect.top = rectProto.top(); | 
 | 155 |     rect.right = rectProto.right(); | 
 | 156 |     rect.bottom = rectProto.bottom(); | 
 | 157 |  | 
 | 158 |     return rect; | 
 | 159 | } | 
 | 160 |  | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 161 | LayerProtoParser::Transform LayerProtoParser::generateTransform( | 
 | 162 |         const TransformProto& transformProto) { | 
 | 163 |     LayerProtoParser::Transform transform; | 
 | 164 |     transform.dsdx = transformProto.dsdx(); | 
 | 165 |     transform.dtdx = transformProto.dtdx(); | 
 | 166 |     transform.dsdy = transformProto.dsdy(); | 
 | 167 |     transform.dtdy = transformProto.dtdy(); | 
 | 168 |  | 
 | 169 |     return transform; | 
 | 170 | } | 
 | 171 |  | 
 | 172 | LayerProtoParser::ActiveBuffer LayerProtoParser::generateActiveBuffer( | 
 | 173 |         const ActiveBufferProto& activeBufferProto) { | 
 | 174 |     LayerProtoParser::ActiveBuffer activeBuffer; | 
 | 175 |     activeBuffer.width = activeBufferProto.width(); | 
 | 176 |     activeBuffer.height = activeBufferProto.height(); | 
 | 177 |     activeBuffer.stride = activeBufferProto.stride(); | 
 | 178 |     activeBuffer.format = activeBufferProto.format(); | 
 | 179 |  | 
 | 180 |     return activeBuffer; | 
 | 181 | } | 
 | 182 |  | 
 | 183 | void LayerProtoParser::updateChildrenAndRelative(const LayerProto& layerProto, | 
 | 184 |                                                  std::unordered_map<int32_t, Layer*>& layerMap) { | 
 | 185 |     auto currLayer = layerMap[layerProto.id()]; | 
 | 186 |  | 
 | 187 |     for (int i = 0; i < layerProto.children_size(); i++) { | 
 | 188 |         if (layerMap.count(layerProto.children(i)) > 0) { | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 189 |             // Only make unique_ptrs for children since they are guaranteed to be unique, only one | 
 | 190 |             // parent per child. This ensures there will only be one unique_ptr made for each layer. | 
 | 191 |             currLayer->children.push_back(std::unique_ptr<Layer>(layerMap[layerProto.children(i)])); | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 192 |         } | 
 | 193 |     } | 
 | 194 |  | 
 | 195 |     for (int i = 0; i < layerProto.relatives_size(); i++) { | 
 | 196 |         if (layerMap.count(layerProto.relatives(i)) > 0) { | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 197 |             currLayer->relatives.push_back(layerMap[layerProto.relatives(i)]); | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 198 |         } | 
 | 199 |     } | 
 | 200 |  | 
 | 201 |     if (layerProto.has_parent()) { | 
 | 202 |         if (layerMap.count(layerProto.parent()) > 0) { | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 203 |             currLayer->parent = layerMap[layerProto.parent()]; | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 204 |         } | 
 | 205 |     } | 
 | 206 |  | 
 | 207 |     if (layerProto.has_z_order_relative_of()) { | 
 | 208 |         if (layerMap.count(layerProto.z_order_relative_of()) > 0) { | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 209 |             currLayer->zOrderRelativeOf = layerMap[layerProto.z_order_relative_of()]; | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 210 |         } | 
 | 211 |     } | 
 | 212 | } | 
 | 213 |  | 
 | 214 | std::string LayerProtoParser::layersToString( | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 215 |         std::vector<std::unique_ptr<LayerProtoParser::Layer>> layers) { | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 216 |     std::string result; | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 217 |     for (std::unique_ptr<LayerProtoParser::Layer>& layer : layers) { | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 218 |         if (layer->zOrderRelativeOf != nullptr) { | 
 | 219 |             continue; | 
 | 220 |         } | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 221 |         result.append(layerToString(layer.get()).c_str()); | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 222 |     } | 
 | 223 |  | 
 | 224 |     return result; | 
 | 225 | } | 
 | 226 |  | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 227 | std::string LayerProtoParser::layerToString(LayerProtoParser::Layer* layer) { | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 228 |     std::string result; | 
 | 229 |  | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 230 |     std::vector<Layer*> traverse(layer->relatives); | 
 | 231 |     for (std::unique_ptr<LayerProtoParser::Layer>& child : layer->children) { | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 232 |         if (child->zOrderRelativeOf != nullptr) { | 
 | 233 |             continue; | 
 | 234 |         } | 
 | 235 |  | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 236 |         traverse.push_back(child.get()); | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 237 |     } | 
 | 238 |  | 
 | 239 |     std::sort(traverse.begin(), traverse.end(), sortLayers); | 
 | 240 |  | 
 | 241 |     size_t i = 0; | 
 | 242 |     for (; i < traverse.size(); i++) { | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 243 |         auto& relative = traverse[i]; | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 244 |         if (relative->z >= 0) { | 
 | 245 |             break; | 
 | 246 |         } | 
 | 247 |         result.append(layerToString(relative).c_str()); | 
 | 248 |     } | 
 | 249 |     result.append(layer->to_string().c_str()); | 
 | 250 |     result.append("\n"); | 
 | 251 |     for (; i < traverse.size(); i++) { | 
| chaviw | 7794ec1 | 2018-03-14 13:28:39 -0700 | [diff] [blame] | 252 |         auto& relative = traverse[i]; | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 253 |         result.append(layerToString(relative).c_str()); | 
 | 254 |     } | 
 | 255 |  | 
 | 256 |     return result; | 
 | 257 | } | 
 | 258 |  | 
| chaviw | 5bf9d68 | 2017-10-25 16:31:08 -0700 | [diff] [blame] | 259 | std::string LayerProtoParser::ActiveBuffer::to_string() const { | 
 | 260 |     return StringPrintf("[%4ux%4u:%4u,%s]", width, height, stride, | 
 | 261 |                         decodePixelFormat(format).c_str()); | 
 | 262 | } | 
 | 263 |  | 
 | 264 | std::string LayerProtoParser::Transform::to_string() const { | 
 | 265 |     return StringPrintf("[%.2f, %.2f][%.2f, %.2f]", static_cast<double>(dsdx), | 
 | 266 |                         static_cast<double>(dtdx), static_cast<double>(dsdy), | 
 | 267 |                         static_cast<double>(dtdy)); | 
 | 268 | } | 
 | 269 |  | 
 | 270 | std::string LayerProtoParser::Rect::to_string() const { | 
 | 271 |     return StringPrintf("[%3d, %3d, %3d, %3d]", left, top, right, bottom); | 
 | 272 | } | 
 | 273 |  | 
| Yiwei Zhang | 068e31b | 2018-02-21 13:02:45 -0800 | [diff] [blame] | 274 | std::string LayerProtoParser::FloatRect::to_string() const { | 
 | 275 |     return StringPrintf("[%.2f, %.2f, %.2f, %.2f]", left, top, right, bottom); | 
 | 276 | } | 
 | 277 |  | 
| chaviw | 5bf9d68 | 2017-10-25 16:31:08 -0700 | [diff] [blame] | 278 | std::string LayerProtoParser::Region::to_string(const char* what) const { | 
 | 279 |     std::string result = | 
 | 280 |             StringPrintf("  Region %s (this=%lx count=%d)\n", what, static_cast<unsigned long>(id), | 
 | 281 |                          static_cast<int>(rects.size())); | 
 | 282 |  | 
 | 283 |     for (auto& rect : rects) { | 
 | 284 |         StringAppendF(&result, "    %s\n", rect.to_string().c_str()); | 
 | 285 |     } | 
 | 286 |  | 
 | 287 |     return result; | 
 | 288 | } | 
 | 289 |  | 
 | 290 | std::string LayerProtoParser::Layer::to_string() const { | 
 | 291 |     std::string result; | 
 | 292 |     StringAppendF(&result, "+ %s (%s)\n", type.c_str(), name.c_str()); | 
 | 293 |     result.append(transparentRegion.to_string("TransparentRegion").c_str()); | 
 | 294 |     result.append(visibleRegion.to_string("VisibleRegion").c_str()); | 
 | 295 |     result.append(damageRegion.to_string("SurfaceDamageRegion").c_str()); | 
 | 296 |  | 
 | 297 |     StringAppendF(&result, "      layerStack=%4d, z=%9d, pos=(%g,%g), size=(%4d,%4d), ", layerStack, | 
 | 298 |                   z, static_cast<double>(position.x), static_cast<double>(position.y), size.x, | 
 | 299 |                   size.y); | 
 | 300 |  | 
 | 301 |     StringAppendF(&result, "crop=%s, finalCrop=%s, ", crop.to_string().c_str(), | 
 | 302 |                   finalCrop.to_string().c_str()); | 
 | 303 |     StringAppendF(&result, "isOpaque=%1d, invalidate=%1d, ", isOpaque, invalidate); | 
 | 304 |     StringAppendF(&result, "dataspace=%s, ", dataspace.c_str()); | 
| Chia-I Wu | 1e04361 | 2018-03-01 09:45:09 -0800 | [diff] [blame] | 305 |     StringAppendF(&result, "defaultPixelFormat=%s, ", pixelFormat.c_str()); | 
| chaviw | 5bf9d68 | 2017-10-25 16:31:08 -0700 | [diff] [blame] | 306 |     StringAppendF(&result, "color=(%.3f,%.3f,%.3f,%.3f), flags=0x%08x, ", | 
 | 307 |                   static_cast<double>(color.r), static_cast<double>(color.g), | 
 | 308 |                   static_cast<double>(color.b), static_cast<double>(color.a), flags); | 
 | 309 |     StringAppendF(&result, "tr=%s", transform.to_string().c_str()); | 
 | 310 |     result.append("\n"); | 
 | 311 |     StringAppendF(&result, "      parent=%s\n", parent == nullptr ? "none" : parent->name.c_str()); | 
 | 312 |     StringAppendF(&result, "      zOrderRelativeOf=%s\n", | 
 | 313 |                   zOrderRelativeOf == nullptr ? "none" : zOrderRelativeOf->name.c_str()); | 
 | 314 |     StringAppendF(&result, "      activeBuffer=%s,", activeBuffer.to_string().c_str()); | 
| rongliu | ccd3484 | 2018-03-14 12:26:23 -0700 | [diff] [blame] | 315 |     StringAppendF(&result, " queued-frames=%d, mRefreshPending=%d,", queuedFrames, refreshPending); | 
 | 316 |     StringAppendF(&result, " windowType=%d, appId=%d", windowType, appId); | 
| chaviw | 5bf9d68 | 2017-10-25 16:31:08 -0700 | [diff] [blame] | 317 |  | 
 | 318 |     return result; | 
 | 319 | } | 
 | 320 |  | 
| chaviw | 1d04428 | 2017-09-27 12:19:28 -0700 | [diff] [blame] | 321 | } // namespace surfaceflinger | 
 | 322 | } // namespace android |