diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/cc/paint/paint_image_builder.h | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/cc/paint/paint_image_builder.h')
-rw-r--r-- | chromium/cc/paint/paint_image_builder.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/chromium/cc/paint/paint_image_builder.h b/chromium/cc/paint/paint_image_builder.h index 25a20bf1a9c..8820b078f5e 100644 --- a/chromium/cc/paint/paint_image_builder.h +++ b/chromium/cc/paint/paint_image_builder.h @@ -43,10 +43,17 @@ class CC_PAINT_EXPORT PaintImageBuilder { PaintImageBuilder&& set_image(sk_sp<SkImage> sk_image, PaintImage::ContentId content_id) { + DCHECK(!sk_image->isTextureBacked()); paint_image_.sk_image_ = std::move(sk_image); paint_image_.content_id_ = content_id; return std::move(*this); } + PaintImageBuilder&& set_texture_backing(sk_sp<TextureBacking> texture_backing, + PaintImage::ContentId content_id) { + paint_image_.texture_backing_ = std::move(texture_backing); + paint_image_.content_id_ = content_id; + return std::move(*this); + } PaintImageBuilder&& set_paint_record(sk_sp<PaintRecord> paint_record, const gfx::Rect& rect, PaintImage::ContentId content_id) { @@ -62,7 +69,6 @@ class CC_PAINT_EXPORT PaintImageBuilder { paint_image_.paint_image_generator_ = std::move(generator); return std::move(*this); } - PaintImageBuilder&& set_animation_type(PaintImage::AnimationType type) { paint_image_.animation_type_ = type; return std::move(*this); @@ -105,19 +111,26 @@ class CC_PAINT_EXPORT PaintImageBuilder { paint_image_.paint_worklet_input_ = std::move(input); return std::move(*this); } - PaintImageBuilder&& set_texture_backing(sk_sp<TextureBacking> texture_backing, - PaintImage::ContentId content_id) { - paint_image_.texture_backing_ = std::move(texture_backing); - paint_image_.content_id_ = content_id; - return std::move(*this); - } PaintImage TakePaintImage(); private: + friend class PaintOpReader; + friend class PaintShader; + friend class ImagePaintFilter; + friend PaintImage CreateNonDiscardablePaintImage(const gfx::Size& size); + PaintImageBuilder(); PaintImageBuilder(PaintImage starting_image, bool clear_contents); + // For GPU process callers using a texture backed SkImage. + PaintImageBuilder&& set_texture_image(sk_sp<SkImage> sk_image, + PaintImage::ContentId content_id) { + paint_image_.sk_image_ = std::move(sk_image); + paint_image_.content_id_ = content_id; + return std::move(*this); + } + PaintImage paint_image_; #if DCHECK_IS_ON() bool id_set_ = false; |