#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/graphics/paint/raster_invalidation_tracking.h"
#include <algorithm>
#include "base/logging.h"
#include "cc/layers/layer.h"
#include "third_party/blink/renderer/platform/geometry/geometry_as_json.h"
#include "third_party/blink/renderer/platform/graphics/color.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_canvas.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_recorder.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/text/string_utf8_adaptor.h"
#include "third_party/skia/include/core/SkImageFilter.h"
namespace blink {
static bool g_simulate_raster_under_invalidations = …;
void RasterInvalidationTracking::SimulateRasterUnderInvalidations(bool enable) { … }
bool RasterInvalidationTracking::ShouldAlwaysTrack() { … }
bool RasterInvalidationTracking::IsTracingRasterInvalidations() { … }
void RasterInvalidationTracking::AddInvalidation(
DisplayItemClientId client_id,
const String& debug_name,
const gfx::Rect& rect,
PaintInvalidationReason reason) { … }
static bool CompareRasterInvalidationInfo(const RasterInvalidationInfo& a,
const RasterInvalidationInfo& b) { … }
void RasterInvalidationTracking::AsJSON(JSONObject* json, bool detailed) const { … }
void RasterInvalidationTracking::AddToLayerDebugInfo(
cc::LayerDebugInfo& debug_info) const { … }
static bool PixelComponentsDiffer(int c1, int c2) { … }
static bool PixelsDiffer(SkColor p1, SkColor p2) { … }
void RasterInvalidationTracking::CheckUnderInvalidations(
const String& layer_debug_name,
PaintRecord new_record,
const gfx::Rect& new_interest_rect) { … }
}