mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 132.0.6834.0
This commit is contained in:
@ -6,6 +6,9 @@
|
||||
#define CEF_LIBCEF_BROWSER_IMAGE_IMPL_H_
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include "cef/include/cef_image.h"
|
||||
#include "cef/libcef/browser/thread_util.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
@ -96,26 +99,26 @@ class CefImageImpl : public CefImage {
|
||||
SkAlphaType target_at);
|
||||
|
||||
// The |bitmap| argument will be RGBA or BGRA and either opaque or transparent
|
||||
// with post-multiplied alpha. Writes the compressed output into |compressed|.
|
||||
// with post-multiplied alpha. Returns the compressed output or std::nullopt.
|
||||
using CompressionMethod =
|
||||
base::OnceCallback<bool(const SkBitmap& /*bitmap*/,
|
||||
std::vector<unsigned char>* /*compressed*/)>;
|
||||
base::OnceCallback<std::optional<std::vector<uint8_t>>(
|
||||
const SkBitmap& /*bitmap*/)>;
|
||||
|
||||
// Write |bitmap| into |compressed| using |method|.
|
||||
static bool WriteCompressedFormat(const SkBitmap& bitmap,
|
||||
std::vector<unsigned char>* compressed,
|
||||
CompressionMethod method);
|
||||
// Write |bitmap| using |method|. Returns the compressed output or
|
||||
// std::nullopt.
|
||||
static std::optional<std::vector<uint8_t>> WriteCompressedFormat(
|
||||
const SkBitmap& bitmap,
|
||||
CompressionMethod method);
|
||||
|
||||
// Write |bitmap| into |compressed| using PNG encoding.
|
||||
static bool WritePNG(const SkBitmap& bitmap,
|
||||
std::vector<unsigned char>* compressed,
|
||||
bool with_transparency);
|
||||
// Write |bitmap|using PNG encoding. Returns the compressed output or
|
||||
// std::nullopt.
|
||||
static std::optional<std::vector<uint8_t>> WritePNG(const SkBitmap& bitmap,
|
||||
bool with_transparency);
|
||||
|
||||
// Write |bitmap| into |compressed| using JPEG encoding. The alpha channel
|
||||
// will be ignored.
|
||||
static bool WriteJPEG(const SkBitmap& bitmap,
|
||||
std::vector<unsigned char>* compressed,
|
||||
int quality);
|
||||
// Write |bitmap| using JPEG encoding. The alpha channel will be ignored.
|
||||
// Returns the compressed output or std::nullopt.
|
||||
static std::optional<std::vector<uint8_t>> WriteJPEG(const SkBitmap& bitmap,
|
||||
int quality);
|
||||
|
||||
mutable base::Lock lock_;
|
||||
|
||||
|
Reference in New Issue
Block a user