Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1147)

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp

Issue 2812763002: paint: Introduce PaintImage that wraps SkImage in paint calls. (Closed)
Patch Set: update Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
index e6a72baa679ba184de6931c4f45467025306aa12..767d2a97d7fdf654d7c67b60b333409c203848eb 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
@@ -46,6 +46,7 @@
#include "platform/graphics/UnacceleratedImageBufferSurface.h"
#include "platform/graphics/gpu/DrawingBuffer.h"
#include "platform/graphics/gpu/Extensions3DUtil.h"
+#include "platform/graphics/paint/PaintImage.h"
#include "platform/graphics/paint/PaintRecord.h"
#include "platform/graphics/skia/SkiaUtils.h"
#include "platform/image-encoders/JPEGImageEncoder.h"
@@ -584,7 +585,11 @@ void ImageBuffer::SetSurface(std::unique_ptr<ImageBufferSurface> surface) {
// will fail at playback time.
image = image->makeNonTextureImage();
}
- surface->Canvas()->drawImage(std::move(image), 0, 0);
+ // TODO(vmpstr): Figure out actual values for this.
+ auto animation_type = PaintImage::AnimationType::UNKNOWN;
+ auto completion_state = PaintImage::CompletionState::UNKNOWN;
+ surface->Canvas()->drawImage(
+ PaintImage(std::move(image), animation_type, completion_state), 0, 0);
surface->SetImageBuffer(this);
if (client_)

Powered by Google App Engine
This is Rietveld 408576698