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

Side by Side Diff: Source/WebCore/rendering/RenderLayerCompositor.cpp

Issue 13643002: Rename LOG() to LOG_INFO() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: rebase Created 7 years, 8 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
« no previous file with comments | « Source/WebCore/platform/sql/SQLiteStatement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 527
528 #if !LOG_DISABLED 528 #if !LOG_DISABLED
529 if (compositingLogEnabled() && isFullUpdate && (needHierarchyUpdate || needG eometryUpdate)) { 529 if (compositingLogEnabled() && isFullUpdate && (needHierarchyUpdate || needG eometryUpdate)) {
530 m_obligateCompositedLayerCount = 0; 530 m_obligateCompositedLayerCount = 0;
531 m_secondaryCompositedLayerCount = 0; 531 m_secondaryCompositedLayerCount = 0;
532 m_obligatoryBackingStoreBytes = 0; 532 m_obligatoryBackingStoreBytes = 0;
533 m_secondaryBackingStoreBytes = 0; 533 m_secondaryBackingStoreBytes = 0;
534 534
535 Frame* frame = m_renderView->frameView()->frame(); 535 Frame* frame = m_renderView->frameView()->frame();
536 bool isMainFrame = !m_renderView->document()->ownerElement(); 536 bool isMainFrame = !m_renderView->document()->ownerElement();
537 LOG(Compositing, "\nUpdate %d of %s. Overlap testing is %s\n", m_rootLay erUpdateCount, isMainFrame ? "main frame" : frame->tree()->uniqueName().string() .utf8().data(), 537 LOG_INFO(Compositing, "\nUpdate %d of %s. Overlap testing is %s\n", m_ro otLayerUpdateCount, isMainFrame ? "main frame" : frame->tree()->uniqueName().str ing().utf8().data(),
538 m_compositingConsultsOverlap ? "on" : "off"); 538 m_compositingConsultsOverlap ? "on" : "off");
539 } 539 }
540 #endif 540 #endif
541 541
542 if (needHierarchyUpdate) { 542 if (needHierarchyUpdate) {
543 // Update the hierarchy of the compositing layers. 543 // Update the hierarchy of the compositing layers.
544 Vector<GraphicsLayer*> childList; 544 Vector<GraphicsLayer*> childList;
545 rebuildCompositingLayerTree(updateRoot, childList, 0); 545 rebuildCompositingLayerTree(updateRoot, childList, 0);
546 546
547 // Host the document layer in the RenderView's root layer. 547 // Host the document layer in the RenderView's root layer.
548 if (isFullUpdate) { 548 if (isFullUpdate) {
549 // Even when childList is empty, don't drop out of compositing mode if there are 549 // Even when childList is empty, don't drop out of compositing mode if there are
550 // composited layers that we didn't hit in our traversal (e.g. becau se of visibility:hidden). 550 // composited layers that we didn't hit in our traversal (e.g. becau se of visibility:hidden).
551 if (childList.isEmpty() && !hasAnyAdditionalCompositedLayers(updateR oot)) 551 if (childList.isEmpty() && !hasAnyAdditionalCompositedLayers(updateR oot))
552 destroyRootLayer(); 552 destroyRootLayer();
553 else 553 else
554 m_rootContentLayer->setChildren(childList); 554 m_rootContentLayer->setChildren(childList);
555 } 555 }
556 } else if (needGeometryUpdate) { 556 } else if (needGeometryUpdate) {
557 // We just need to do a geometry update. This is only used for position: fixed scrolling; 557 // We just need to do a geometry update. This is only used for position: fixed scrolling;
558 // most of the time, geometry is updated via RenderLayer::styleChanged() . 558 // most of the time, geometry is updated via RenderLayer::styleChanged() .
559 updateLayerTreeGeometry(updateRoot, 0); 559 updateLayerTreeGeometry(updateRoot, 0);
560 } 560 }
561 561
562 #if !LOG_DISABLED 562 #if !LOG_DISABLED
563 if (compositingLogEnabled() && isFullUpdate && (needHierarchyUpdate || needG eometryUpdate)) { 563 if (compositingLogEnabled() && isFullUpdate && (needHierarchyUpdate || needG eometryUpdate)) {
564 double endTime = currentTime(); 564 double endTime = currentTime();
565 LOG(Compositing, "Total layers primary secondary obligatory backin g (KB) secondary backing(KB) total backing (KB) update time (ms)\n"); 565 LOG_INFO(Compositing, "Total layers primary secondary obligatory b acking (KB) secondary backing(KB) total backing (KB) update time (ms)\n");
566 566
567 LOG(Compositing, "%8d %11d %9d %20.2f %22.2f %22.2f %18.2f\n", 567 LOG_INFO(Compositing, "%8d %11d %9d %20.2f %22.2f %22.2f %18.2f\n",
568 m_obligateCompositedLayerCount + m_secondaryCompositedLayerCount, m_ obligateCompositedLayerCount, 568 m_obligateCompositedLayerCount + m_secondaryCompositedLayerCoun t, m_obligateCompositedLayerCount,
569 m_secondaryCompositedLayerCount, m_obligatoryBackingStoreBytes / 102 4, m_secondaryBackingStoreBytes / 1024, (m_obligatoryBackingStoreBytes + m_secon daryBackingStoreBytes) / 1024, 1000.0 * (endTime - startTime)); 569 m_secondaryCompositedLayerCount, m_obligatoryBackingStoreBytes / 1024, m_secondaryBackingStoreBytes / 1024, (m_obligatoryBackingStoreBytes + m_ secondaryBackingStoreBytes) / 1024, 1000.0 * (endTime - startTime));
570 } 570 }
571 #endif 571 #endif
572 ASSERT(updateRoot || !m_compositingLayersNeedRebuild); 572 ASSERT(updateRoot || !m_compositingLayersNeedRebuild);
573 573
574 if (!hasAcceleratedCompositing()) 574 if (!hasAcceleratedCompositing())
575 enableCompositingMode(false); 575 enableCompositingMode(false);
576 576
577 // Inform the inspector that the layer tree has changed. 577 // Inform the inspector that the layer tree has changed.
578 InspectorInstrumentation::layerTreeDidChange(page()); 578 InspectorInstrumentation::layerTreeDidChange(page());
579 } 579 }
(...skipping 15 matching lines...) Expand all
595 595
596 RenderLayerBacking* backing = layer->backing(); 596 RenderLayerBacking* backing = layer->backing();
597 if (requiresCompositingLayer(layer) || layer->isRootLayer()) { 597 if (requiresCompositingLayer(layer) || layer->isRootLayer()) {
598 ++m_obligateCompositedLayerCount; 598 ++m_obligateCompositedLayerCount;
599 m_obligatoryBackingStoreBytes += backing->backingStoreMemoryEstimate(); 599 m_obligatoryBackingStoreBytes += backing->backingStoreMemoryEstimate();
600 } else { 600 } else {
601 ++m_secondaryCompositedLayerCount; 601 ++m_secondaryCompositedLayerCount;
602 m_secondaryBackingStoreBytes += backing->backingStoreMemoryEstimate(); 602 m_secondaryBackingStoreBytes += backing->backingStoreMemoryEstimate();
603 } 603 }
604 604
605 LOG(Compositing, "%*p %dx%d %.2fKB (%s) %s\n", 12 + depth * 2, layer, backin g->compositedBounds().width(), backing->compositedBounds().height(), 605 LOG_INFO(Compositing, "%*p %dx%d %.2fKB (%s) %s\n", 12 + depth * 2, layer, b acking->compositedBounds().width(), backing->compositedBounds().height(),
606 backing->backingStoreMemoryEstimate() / 1024, 606 backing->backingStoreMemoryEstimate() / 1024,
607 logReasonsForCompositing(layer), layer->name().utf8().data()); 607 logReasonsForCompositing(layer), layer->name().utf8().data());
608 } 608 }
609 #endif 609 #endif
610 610
611 bool RenderLayerCompositor::updateBacking(RenderLayer* layer, CompositingChangeR epaint shouldRepaint) 611 bool RenderLayerCompositor::updateBacking(RenderLayer* layer, CompositingChangeR epaint shouldRepaint)
612 { 612 {
613 bool layerChanged = false; 613 bool layerChanged = false;
614 RenderLayer::ViewportConstrainedNotCompositedReason viewportConstrainedNotCo mpositedReason = RenderLayer::NoNotCompositedReason; 614 RenderLayer::ViewportConstrainedNotCompositedReason viewportConstrainedNotCo mpositedReason = RenderLayer::NoNotCompositedReason;
615 615
616 if (needsToBeComposited(layer, &viewportConstrainedNotCompositedReason)) { 616 if (needsToBeComposited(layer, &viewportConstrainedNotCompositedReason)) {
617 enableCompositingMode(); 617 enableCompositingMode();
(...skipping 2539 matching lines...) Expand 10 before | Expand all | Expand 10 after
3157 info.addMember(m_layerForBottomOverhangArea, "layerForBottomOverhangArea"); 3157 info.addMember(m_layerForBottomOverhangArea, "layerForBottomOverhangArea");
3158 info.addMember(m_layerForHeader, "layerForHeader"); 3158 info.addMember(m_layerForHeader, "layerForHeader");
3159 info.addMember(m_layerForFooter, "layerForFooter"); 3159 info.addMember(m_layerForFooter, "layerForFooter");
3160 #endif 3160 #endif
3161 info.addMember(m_layerUpdater, "layerUpdater"); 3161 info.addMember(m_layerUpdater, "layerUpdater");
3162 } 3162 }
3163 3163
3164 } // namespace WebCore 3164 } // namespace WebCore
3165 3165
3166 #endif // USE(ACCELERATED_COMPOSITING) 3166 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « Source/WebCore/platform/sql/SQLiteStatement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698