Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2015433004: Add main thread scrolling reasons to GraphicsLayer::layerTreeAsJSON. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 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 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 } 1249 }
1250 } 1250 }
1251 1251
1252 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> GraphicsLayer::Take DebugInfo(cc::Layer* layer) 1252 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> GraphicsLayer::Take DebugInfo(cc::Layer* layer)
1253 { 1253 {
1254 std::unique_ptr<base::trace_event::TracedValue> tracedValue(m_debugInfo.asTr acedValue()); 1254 std::unique_ptr<base::trace_event::TracedValue> tracedValue(m_debugInfo.asTr acedValue());
1255 tracedValue->SetString("layer_name", WTF::StringUTF8Adaptor(debugName(layer) ).asStringPiece()); 1255 tracedValue->SetString("layer_name", WTF::StringUTF8Adaptor(debugName(layer) ).asStringPiece());
1256 return std::move(tracedValue); 1256 return std::move(tracedValue);
1257 } 1257 }
1258 1258
1259 void GraphicsLayer::didUpdateMainThreadScrollingReasons()
1260 {
1261 m_debugInfo.setMainThreadScrollingReasons(platformLayer()->mainThreadScrolli ngReasons());
1262 }
1263
1259 PaintController& GraphicsLayer::getPaintController() 1264 PaintController& GraphicsLayer::getPaintController()
1260 { 1265 {
1261 RELEASE_ASSERT(drawsContent()); 1266 RELEASE_ASSERT(drawsContent());
1262 if (!m_paintController) 1267 if (!m_paintController)
1263 m_paintController = PaintController::create(); 1268 m_paintController = PaintController::create();
1264 return *m_paintController; 1269 return *m_paintController;
1265 } 1270 }
1266 1271
1267 void GraphicsLayer::setElementId(const CompositorElementId& id) 1272 void GraphicsLayer::setElementId(const CompositorElementId& id)
1268 { 1273 {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 { 1379 {
1375 if (!layer) { 1380 if (!layer) {
1376 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); 1381 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n");
1377 return; 1382 return;
1378 } 1383 }
1379 1384
1380 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1385 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1381 fprintf(stderr, "%s\n", output.utf8().data()); 1386 fprintf(stderr, "%s\n", output.utf8().data());
1382 } 1387 }
1383 #endif 1388 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698