Chromium Code Reviews| Index: Source/platform/graphics/FirstPaintInvalidationTracking.cpp |
| diff --git a/Source/platform/graphics/FirstPaintInvalidationTracking.cpp b/Source/platform/graphics/FirstPaintInvalidationTracking.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9c4ad0bfccfb316ed6e8dea87066c071b65153c8 |
| --- /dev/null |
| +++ b/Source/platform/graphics/FirstPaintInvalidationTracking.cpp |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "config.h" |
| +#include "platform/graphics/FirstPaintInvalidationTracking.h" |
| + |
| +#include "platform/TraceEvent.h" |
| + |
| +namespace blink { |
| + |
| +namespace { |
| +bool showPaintRectsEnabled = false; |
|
tkent
2014/09/10 00:03:27
static bool showPaintRectsEnabled = false;
is sim
kouhei (in TOK)
2014/09/10 23:46:29
Done.
|
| +} // namespace |
| + |
| +bool firstPaintInvalidationTrackingEnabled() |
| +{ |
| + if (showPaintRectsEnabled) |
| + return true; |
| + |
| + bool isTracingEnabled; |
| + TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), &isTracingEnabled); |
| + return isTracingEnabled; |
| +} |
| + |
| +void setFirstPaintInvalidationTrackingEnabledForShowPaintRects(bool b) |
| +{ |
| + showPaintRectsEnabled = b; |
| +} |
| + |
| +} |