| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 { | 359 { |
| 360 if (mainThreadScrollingReasons) { | 360 if (mainThreadScrollingReasons) { |
| 361 StringBuilder reasonsDescription; | 361 StringBuilder reasonsDescription; |
| 362 | 362 |
| 363 if (mainThreadScrollingReasons & ScrollingCoordinator::ForcedOnMainThrea
d) | 363 if (mainThreadScrollingReasons & ScrollingCoordinator::ForcedOnMainThrea
d) |
| 364 reasonsDescription.append("forced,"); | 364 reasonsDescription.append("forced,"); |
| 365 if (mainThreadScrollingReasons & ScrollingCoordinator::HasSlowRepaintObj
ects) | 365 if (mainThreadScrollingReasons & ScrollingCoordinator::HasSlowRepaintObj
ects) |
| 366 reasonsDescription.append("slow-repaint objects,"); | 366 reasonsDescription.append("slow-repaint objects,"); |
| 367 if (mainThreadScrollingReasons & ScrollingCoordinator::HasViewportConstr
ainedObjectsWithoutSupportingFixedLayers) | 367 if (mainThreadScrollingReasons & ScrollingCoordinator::HasViewportConstr
ainedObjectsWithoutSupportingFixedLayers) |
| 368 reasonsDescription.append("viewport-constrained objects,"); | 368 reasonsDescription.append("viewport-constrained objects,"); |
| 369 if (mainThreadScrollingReasons & ScrollingCoordinator::HasNonLayerFixedO
bjects) | 369 if (mainThreadScrollingReasons & ScrollingCoordinator::HasNonLayerViewpo
rtConstrainedObjects) |
| 370 reasonsDescription.append("non-layer viewport-constrained objects,")
; | 370 reasonsDescription.append("non-layer viewport-constrained objects,")
; |
| 371 if (mainThreadScrollingReasons & ScrollingCoordinator::IsImageDocument) | 371 if (mainThreadScrollingReasons & ScrollingCoordinator::IsImageDocument) |
| 372 reasonsDescription.append("image document,"); | 372 reasonsDescription.append("image document,"); |
| 373 | 373 |
| 374 // Strip the trailing comma. | 374 // Strip the trailing comma. |
| 375 String reasonsDescriptionTrimmed = reasonsDescription.toString().left(re
asonsDescription.length() - 1); | 375 String reasonsDescriptionTrimmed = reasonsDescription.toString().left(re
asonsDescription.length() - 1); |
| 376 | 376 |
| 377 WTFLogAlways("SCROLLING: Switching to main-thread scrolling mode. Time:
%f Reason(s): %s\n", WTF::monotonicallyIncreasingTime(), reasonsDescriptionTrimm
ed.ascii().data()); | 377 WTFLogAlways("SCROLLING: Switching to main-thread scrolling mode. Time:
%f Reason(s): %s\n", WTF::monotonicallyIncreasingTime(), reasonsDescriptionTrimm
ed.ascii().data()); |
| 378 } else | 378 } else |
| 379 WTFLogAlways("SCROLLING: Switching to threaded scrolling mode. Time: %f\
n", WTF::monotonicallyIncreasingTime()); | 379 WTFLogAlways("SCROLLING: Switching to threaded scrolling mode. Time: %f\
n", WTF::monotonicallyIncreasingTime()); |
| 380 } | 380 } |
| 381 | 381 |
| 382 } // namespace WebCore | 382 } // namespace WebCore |
| 383 | 383 |
| 384 #endif // ENABLE(THREADED_SCROLLING) | 384 #endif // ENABLE(THREADED_SCROLLING) |
| OLD | NEW |