1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "config.h"
6#include "platform/graphics/FirstPaintInvalidationTracking.h"
7
8#include "platform/TraceEvent.h"
9
10namespace blink {
11
12static bool showPaintRectsEnabled = false;
13
14bool firstPaintInvalidationTrackingEnabled()
15{
16    if (showPaintRectsEnabled)
17        return true;
18
19    bool isTracingEnabled;
20    TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), &isTracingEnabled);
21    return isTracingEnabled;
22}
23
24void setFirstPaintInvalidationTrackingEnabledForShowPaintRects(bool b)
25{
26    showPaintRectsEnabled = b;
27}
28
29}
30