#include "cc/tiles/image_controller.h"
#include <utility>
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/not_fatal_until.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/trace_event/trace_event.h"
#include "cc/base/completion_event.h"
#include "cc/tiles/tile_task_manager.h"
namespace cc {
ImageController::ImageDecodeRequestId
ImageController::s_next_image_decode_queue_id_ = …;
ImageController::ImageController(
scoped_refptr<base::SequencedTaskRunner> origin_task_runner,
scoped_refptr<base::SequencedTaskRunner> worker_task_runner)
: … { … }
ImageController::~ImageController() { … }
ImageController::WorkerState::WorkerState(
scoped_refptr<base::SequencedTaskRunner> origin_task_runner,
base::WeakPtr<ImageController> weak_ptr)
: … { … }
ImageController::WorkerState::~WorkerState() = default;
void ImageController::StopWorkerTasks() { … }
void ImageController::SetImageDecodeCache(ImageDecodeCache* cache) { … }
void ImageController::ConvertImagesToTasks(
std::vector<DrawImage>* sync_decoded_images,
std::vector<scoped_refptr<TileTask>>* tasks,
bool* has_at_raster_images,
bool* has_hardware_accelerated_jpeg_candidates,
bool* has_hardware_accelerated_webp_candidates,
const ImageDecodeCache::TracingInfo& tracing_info) { … }
void ImageController::UnrefImages(const std::vector<DrawImage>& images) { … }
void ImageController::ReduceMemoryUsage() { … }
std::vector<scoped_refptr<TileTask>> ImageController::SetPredecodeImages(
std::vector<DrawImage> images,
const ImageDecodeCache::TracingInfo& tracing_info) { … }
ImageController::ImageDecodeRequestId ImageController::QueueImageDecode(
const DrawImage& draw_image,
ImageDecodedCallback callback) { … }
void ImageController::UnlockImageDecode(ImageDecodeRequestId id) { … }
void ImageController::ProcessNextImageDecodeOnWorkerThread(
WorkerState* worker_state) { … }
void ImageController::ImageDecodeCompleted(ImageDecodeRequestId id) { … }
void ImageController::GenerateTasksForOrphanedRequests() { … }
void ImageController::ScheduleImageDecodeOnWorkerIfNeeded() { … }
ImageController::ImageDecodeRequest::ImageDecodeRequest() = default;
ImageController::ImageDecodeRequest::ImageDecodeRequest(
ImageDecodeRequestId id,
const DrawImage& draw_image,
ImageDecodedCallback callback,
scoped_refptr<TileTask> task,
bool need_unref)
: … { … }
ImageController::ImageDecodeRequest::ImageDecodeRequest(
ImageDecodeRequest&& other) = default;
ImageController::ImageDecodeRequest::~ImageDecodeRequest() = default;
ImageController::ImageDecodeRequest& ImageController::ImageDecodeRequest::
operator=(ImageDecodeRequest&& other) = default;
}