| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/graphics/CompositingReasons.h" | 5 #include "platform/graphics/CompositingReasons.h" |
| 6 | 6 |
| 7 #include "wtf/StdLibExtras.h" | 7 #include "platform/wtf/StdLibExtras.h" |
| 8 #include "wtf/text/StringBuilder.h" | 8 #include "platform/wtf/text/StringBuilder.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 const CompositingReasonStringMap kCompositingReasonStringMap[] = { | 12 const CompositingReasonStringMap kCompositingReasonStringMap[] = { |
| 13 {CompositingReasonNone, "Unknown", "No reason given"}, | 13 {CompositingReasonNone, "Unknown", "No reason given"}, |
| 14 {CompositingReason3DTransform, "transform3D", "Has a 3d transform"}, | 14 {CompositingReason3DTransform, "transform3D", "Has a 3d transform"}, |
| 15 {CompositingReasonVideo, "video", "Is an accelerated video"}, | 15 {CompositingReasonVideo, "video", "Is an accelerated video"}, |
| 16 {CompositingReasonCanvas, "canvas", | 16 {CompositingReasonCanvas, "canvas", |
| 17 "Is an accelerated canvas, or is a display list backed canvas that was " | 17 "Is an accelerated canvas, or is a display list backed canvas that was " |
| 18 "promoted to a layer based on a performance heuristic."}, | 18 "promoted to a layer based on a performance heuristic."}, |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 if (reasons & kCompositingReasonStringMap[i].reason) { | 155 if (reasons & kCompositingReasonStringMap[i].reason) { |
| 156 if (builder.length()) | 156 if (builder.length()) |
| 157 builder.append(','); | 157 builder.append(','); |
| 158 builder.append(kCompositingReasonStringMap[i].shortName); | 158 builder.append(kCompositingReasonStringMap[i].shortName); |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 return builder.toString(); | 161 return builder.toString(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace blink | 164 } // namespace blink |
| OLD | NEW |