#include "third_party/blink/renderer/platform/graphics/bitmap_image.h"
#include <algorithm>
#include <memory>
#include <utility>
#include "base/memory/scoped_refptr.h"
#include "base/metrics/histogram_macros.h"
#include "cc/paint/paint_flags.h"
#include "third_party/blink/renderer/platform/graphics/bitmap_image_metrics.h"
#include "third_party/blink/renderer/platform/graphics/deferred_image_decoder.h"
#include "third_party/blink/renderer/platform/graphics/graphics_context.h"
#include "third_party/blink/renderer/platform/graphics/image_observer.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_canvas.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_image.h"
#include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h"
#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
#include "third_party/blink/renderer/platform/timer.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "ui/gfx/geometry/rect_f.h"
namespace blink {
int GetRepetitionCountWithPolicyOverride(
int actual_count,
mojom::blink::ImageAnimationPolicy policy) { … }
BitmapImage::BitmapImage(ImageObserver* observer, bool is_multipart)
: … { … }
BitmapImage::~BitmapImage() { … }
bool BitmapImage::CurrentFrameHasSingleSecurityOrigin() const { … }
void BitmapImage::DestroyDecodedData() { … }
scoped_refptr<SharedBuffer> BitmapImage::Data() { … }
bool BitmapImage::HasData() const { … }
size_t BitmapImage::DataSize() const { … }
void BitmapImage::NotifyMemoryChanged() { … }
size_t BitmapImage::TotalFrameBytes() { … }
PaintImage BitmapImage::PaintImageForTesting() { … }
PaintImage BitmapImage::CreatePaintImage() { … }
void BitmapImage::UpdateSize() const { … }
gfx::Size BitmapImage::SizeWithConfig(SizeConfig config) const { … }
void BitmapImage::RecordDecodedImageType(UseCounter* use_counter) { … }
bool BitmapImage::GetHotSpot(gfx::Point& hot_spot) const { … }
bool BitmapImage::ShouldReportByteSizeUMAs(bool data_now_completely_received) { … }
Image::SizeAvailability BitmapImage::SetData(scoped_refptr<SharedBuffer> data,
bool all_data_received) { … }
static inline uint64_t ImageDensityInCentiBpp(gfx::Size size,
size_t image_size_bytes) { … }
Image::SizeAvailability BitmapImage::DataChanged(bool all_data_received) { … }
bool BitmapImage::HasColorProfile() const { … }
String BitmapImage::FilenameExtension() const { … }
const AtomicString& BitmapImage::MimeType() const { … }
void BitmapImage::Draw(cc::PaintCanvas* canvas,
const cc::PaintFlags& flags,
const gfx::RectF& dst_rect,
const gfx::RectF& src_rect,
const ImageDrawOptions& draw_options) { … }
size_t BitmapImage::FrameCount() { … }
static inline bool HasVisibleImageSize(gfx::Size size) { … }
bool BitmapImage::IsSizeAvailable() { … }
PaintImage BitmapImage::PaintImageForCurrentFrame() { … }
scoped_refptr<Image> BitmapImage::ImageForDefaultFrame() { … }
bool BitmapImage::CurrentFrameKnownToBeOpaque() { … }
bool BitmapImage::CurrentFrameIsComplete() { … }
bool BitmapImage::CurrentFrameIsLazyDecoded() { … }
ImageOrientation BitmapImage::CurrentFrameOrientation() const { … }
int BitmapImage::RepetitionCount() { … }
void BitmapImage::ResetAnimation() { … }
bool BitmapImage::MaybeAnimated() { … }
void BitmapImage::SetAnimationPolicy(
mojom::blink::ImageAnimationPolicy policy) { … }
}