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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayerClient.h

Issue 2039363003: FirstMeaningfulPaint UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 LayerTreeIncludesRootLayer = 1 << 3, 55 LayerTreeIncludesRootLayer = 1 << 3,
56 LayerTreeIncludesClipAndScrollParents = 1 << 4, 56 LayerTreeIncludesClipAndScrollParents = 1 << 4,
57 LayerTreeIncludesCompositingReasons = 1 << 5, 57 LayerTreeIncludesCompositingReasons = 1 << 5,
58 }; 58 };
59 typedef unsigned LayerTreeFlags; 59 typedef unsigned LayerTreeFlags;
60 60
61 class PLATFORM_EXPORT GraphicsLayerClient { 61 class PLATFORM_EXPORT GraphicsLayerClient {
62 public: 62 public:
63 virtual ~GraphicsLayerClient() {} 63 virtual ~GraphicsLayerClient() {}
64 64
65 virtual void notifyFirstPaint() { } 65 virtual void notifyPaint(bool isFirstPaint, bool textPainted, bool imagePain ted) { }
66 virtual void notifyFirstTextPaint() { }
67 virtual void notifyFirstImagePaint() { }
68 66
69 virtual IntRect computeInterestRect(const GraphicsLayer*, const IntRect& pre viousInterestRect) const = 0; 67 virtual IntRect computeInterestRect(const GraphicsLayer*, const IntRect& pre viousInterestRect) const = 0;
70 virtual LayoutSize subpixelAccumulation() const { return LayoutSize(); } 68 virtual LayoutSize subpixelAccumulation() const { return LayoutSize(); }
71 // Returns whether the client needs to be repainted with respect to the give n graphics layer. 69 // Returns whether the client needs to be repainted with respect to the give n graphics layer.
72 virtual bool needsRepaint(const GraphicsLayer&) const = 0; 70 virtual bool needsRepaint(const GraphicsLayer&) const = 0;
73 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& interestRect) const = 0; 71 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& interestRect) const = 0;
74 72
75 virtual bool isTrackingPaintInvalidations() const { return false; } 73 virtual bool isTrackingPaintInvalidations() const { return false; }
76 74
77 virtual String debugName(const GraphicsLayer*) const = 0; 75 virtual String debugName(const GraphicsLayer*) const = 0;
78 76
79 #if ENABLE(ASSERT) 77 #if ENABLE(ASSERT)
80 // CompositedLayerMapping overrides this to verify that it is not 78 // CompositedLayerMapping overrides this to verify that it is not
81 // currently painting contents. An ASSERT fails, if it is. 79 // currently painting contents. An ASSERT fails, if it is.
82 // This is executed in GraphicsLayer construction and destruction 80 // This is executed in GraphicsLayer construction and destruction
83 // to verify that we don't create or destroy GraphicsLayers 81 // to verify that we don't create or destroy GraphicsLayers
84 // while painting. 82 // while painting.
85 virtual void verifyNotPainting() { } 83 virtual void verifyNotPainting() { }
86 #endif 84 #endif
87 }; 85 };
88 86
89 } // namespace blink 87 } // namespace blink
90 88
91 #endif // GraphicsLayerClient_h 89 #endif // GraphicsLayerClient_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp ('k') | third_party/WebKit/Source/web/WebPerformance.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698