#include "cc/tiles/checker_image_tracker.h"
#include <algorithm>
#include <limits>
#include <sstream>
#include <string>
#include <utility>
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/metrics/histogram_macros.h"
#include "base/not_fatal_until.h"
#include "base/notreached.h"
#include "base/trace_event/trace_event.h"
namespace cc {
namespace {
enum class CheckerImagingDecision { … };
std::string ToString(PaintImage::Id paint_image_id,
CheckerImagingDecision decision) { … }
CheckerImagingDecision GetAnimationDecision(const PaintImage& image) { … }
CheckerImagingDecision GetLoadDecision(const PaintImage& image) { … }
CheckerImagingDecision GetSizeDecision(const SkIRect& src_rect,
size_t min_bytes,
size_t max_bytes) { … }
CheckerImagingDecision GetCheckerImagingDecision(const PaintImage& image,
const SkIRect& src_rect,
size_t min_bytes,
size_t max_bytes) { … }
}
const int CheckerImageTracker::kNoDecodeAllowedPriority = …;
CheckerImageTracker::ImageDecodeRequest::ImageDecodeRequest(
PaintImage paint_image,
DecodeType type)
: … { … }
CheckerImageTracker::CheckerImageTracker(ImageController* image_controller,
CheckerImageTrackerClient* client,
bool enable_checker_imaging,
size_t min_image_bytes_to_checker)
: … { … }
CheckerImageTracker::~CheckerImageTracker() = default;
void CheckerImageTracker::SetNoDecodesAllowed() { … }
void CheckerImageTracker::SetMaxDecodePriorityAllowed(DecodeType decode_type) { … }
void CheckerImageTracker::ScheduleImageDecodeQueue(
ImageDecodeQueue image_decode_queue) { … }
const PaintImageIdFlatSet&
CheckerImageTracker::TakeImagesToInvalidateOnSyncTree() { … }
void CheckerImageTracker::DidActivateSyncTree() { … }
void CheckerImageTracker::ClearTracker(bool can_clear_decode_policy_tracking) { … }
void CheckerImageTracker::DisallowCheckeringForImage(const PaintImage& image) { … }
void CheckerImageTracker::DidFinishImageDecode(
PaintImage::Id image_id,
ImageController::ImageDecodeRequestId request_id,
ImageController::ImageDecodeResult result) { … }
bool CheckerImageTracker::ShouldCheckerImage(const DrawImage& draw_image,
WhichTree tree) { … }
void CheckerImageTracker::UpdateDecodeState(const DrawImage& draw_image,
PaintImage::Id paint_image_id,
DecodeState* decode_state) { … }
void CheckerImageTracker::ScheduleNextImageDecode() { … }
void CheckerImageTracker::UpdateImageDecodingHints(
base::flat_map<PaintImage::Id, PaintImage::DecodingMode>
decoding_mode_map) { … }
}