#include "cc/resources/ui_resource_bitmap.h"
#include <stdint.h>
#include <memory>
#include <utility>
#include "base/check_op.h"
#include "base/notreached.h"
#include "base/numerics/checked_math.h"
#include "build/build_config.h"
#include "gpu/config/gpu_finch_features.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkMallocPixelRef.h"
#include "third_party/skia/include/core/SkPixelRef.h"
#include "third_party/skia/include/gpu/GrDirectContext.h"
#include "third_party/skia/include/gpu/GrRecordingContext.h"
namespace cc {
namespace {
UIResourceBitmap::UIResourceFormat SkColorTypeToUIResourceFormat(
SkColorType sk_type) { … }
}
void UIResourceBitmap::Create(sk_sp<SkPixelRef> pixel_ref,
const SkImageInfo& info,
UIResourceFormat format) { … }
void UIResourceBitmap::DrawToCanvas(SkCanvas* canvas, SkPaint* paint) { … }
size_t UIResourceBitmap::SizeInBytes() const { … }
UIResourceBitmap::UIResourceBitmap(const SkBitmap& skbitmap) { … }
UIResourceBitmap::UIResourceBitmap(const gfx::Size& size, bool is_opaque) { … }
UIResourceBitmap::UIResourceBitmap(sk_sp<SkPixelRef> pixel_ref,
const gfx::Size& size) { … }
UIResourceBitmap::UIResourceBitmap(const UIResourceBitmap& other) = default;
UIResourceBitmap::~UIResourceBitmap() = default;
SkBitmap UIResourceBitmap::GetBitmapForTesting() const { … }
}