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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 1456883002: Move paint-related timings out of DocumentTiming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "core/layout/LayoutPart.h" 45 #include "core/layout/LayoutPart.h"
46 #include "core/layout/LayoutVideo.h" 46 #include "core/layout/LayoutVideo.h"
47 #include "core/layout/LayoutView.h" 47 #include "core/layout/LayoutView.h"
48 #include "core/layout/compositing/PaintLayerCompositor.h" 48 #include "core/layout/compositing/PaintLayerCompositor.h"
49 #include "core/page/ChromeClient.h" 49 #include "core/page/ChromeClient.h"
50 #include "core/page/Page.h" 50 #include "core/page/Page.h"
51 #include "core/page/scrolling/ScrollingCoordinator.h" 51 #include "core/page/scrolling/ScrollingCoordinator.h"
52 #include "core/paint/PaintInfo.h" 52 #include "core/paint/PaintInfo.h"
53 #include "core/paint/PaintLayerPainter.h" 53 #include "core/paint/PaintLayerPainter.h"
54 #include "core/paint/PaintLayerStackingNodeIterator.h" 54 #include "core/paint/PaintLayerStackingNodeIterator.h"
55 #include "core/paint/PaintTiming.h"
55 #include "core/paint/ScrollableAreaPainter.h" 56 #include "core/paint/ScrollableAreaPainter.h"
56 #include "core/paint/TransformRecorder.h" 57 #include "core/paint/TransformRecorder.h"
57 #include "core/plugins/PluginView.h" 58 #include "core/plugins/PluginView.h"
58 #include "platform/LengthFunctions.h" 59 #include "platform/LengthFunctions.h"
59 #include "platform/RuntimeEnabledFeatures.h" 60 #include "platform/RuntimeEnabledFeatures.h"
60 #include "platform/fonts/FontCache.h" 61 #include "platform/fonts/FontCache.h"
61 #include "platform/geometry/TransformState.h" 62 #include "platform/geometry/TransformState.h"
62 #include "platform/graphics/BitmapImage.h" 63 #include "platform/graphics/BitmapImage.h"
63 #include "platform/graphics/GraphicsContext.h" 64 #include "platform/graphics/GraphicsContext.h"
64 #include "platform/graphics/paint/ClipDisplayItem.h" 65 #include "platform/graphics/paint/ClipDisplayItem.h"
(...skipping 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2351 } 2352 }
2352 #endif 2353 #endif
2353 2354
2354 void CompositedLayerMapping::notifyAnimationStarted(const GraphicsLayer*, double monotonicTime, int group) 2355 void CompositedLayerMapping::notifyAnimationStarted(const GraphicsLayer*, double monotonicTime, int group)
2355 { 2356 {
2356 layoutObject()->node()->document().compositorPendingAnimations().notifyCompo sitorAnimationStarted(monotonicTime, group); 2357 layoutObject()->node()->document().compositorPendingAnimations().notifyCompo sitorAnimationStarted(monotonicTime, group);
2357 } 2358 }
2358 2359
2359 void CompositedLayerMapping::notifyFirstPaint() 2360 void CompositedLayerMapping::notifyFirstPaint()
2360 { 2361 {
2361 // TODO(ksakamoto): This shouldn't be reported to Document. crbug.com/544811 2362 if (PaintTiming* timing = m_owningLayer.paintTiming()) {
2362 if (Node* node = layoutObject()->node()) 2363 if (timing->firstPaint() == 0)
2363 node->document().markFirstPaint(); 2364 timing->markFirstPaint();
2365 }
2364 } 2366 }
2365 2367
2366 void CompositedLayerMapping::notifyFirstTextPaint() 2368 void CompositedLayerMapping::notifyFirstTextPaint()
2367 { 2369 {
2368 if (Node* node = layoutObject()->node()) 2370 if (PaintTiming* timing = m_owningLayer.paintTiming()) {
2369 node->document().markFirstTextPaint(); 2371 if (timing->firstTextPaint() == 0)
2372 timing->markFirstTextPaint();
2373 }
2370 } 2374 }
2371 2375
2372 void CompositedLayerMapping::notifyFirstImagePaint() 2376 void CompositedLayerMapping::notifyFirstImagePaint()
2373 { 2377 {
2374 if (Node* node = layoutObject()->node()) 2378 if (PaintTiming* timing = m_owningLayer.paintTiming()) {
2375 node->document().markFirstImagePaint(); 2379 if (timing->firstImagePaint() == 0)
2380 timing->markFirstImagePaint();
2381 }
2376 } 2382 }
2377 2383
2378 IntRect CompositedLayerMapping::pixelSnappedCompositedBounds() const 2384 IntRect CompositedLayerMapping::pixelSnappedCompositedBounds() const
2379 { 2385 {
2380 LayoutRect bounds = m_compositedBounds; 2386 LayoutRect bounds = m_compositedBounds;
2381 bounds.move(m_owningLayer.subpixelAccumulation()); 2387 bounds.move(m_owningLayer.subpixelAccumulation());
2382 return pixelSnappedIntRect(bounds); 2388 return pixelSnappedIntRect(bounds);
2383 } 2389 }
2384 2390
2385 bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry(size_t indexToCle ar) 2391 bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry(size_t indexToCle ar)
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2517 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2512 name = "Scrolling Block Selection Layer"; 2518 name = "Scrolling Block Selection Layer";
2513 } else { 2519 } else {
2514 ASSERT_NOT_REACHED(); 2520 ASSERT_NOT_REACHED();
2515 } 2521 }
2516 2522
2517 return name; 2523 return name;
2518 } 2524 }
2519 2525
2520 } // namespace blink 2526 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentTiming.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698