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

Unified Diff: media/blink/skcanvas_video_renderer.cc

Issue 1125573002: onGetInfo is deprecated, just pass info to constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | skia/config/SkUserConfig.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/skcanvas_video_renderer.cc
diff --git a/media/blink/skcanvas_video_renderer.cc b/media/blink/skcanvas_video_renderer.cc
index bbfeef82b511e29d58b80ccad096cd18199f80e8..fdb4d9a3d67d6b43e5ed8302d2f135df8d465cd3 100644
--- a/media/blink/skcanvas_video_renderer.cc
+++ b/media/blink/skcanvas_video_renderer.cc
@@ -170,7 +170,11 @@ class SyncPointClientImpl : public VideoFrame::SyncPointClient {
// Generates an RGB image from a VideoFrame. Convert YUV to RGB plain on GPU.
class VideoImageGenerator : public SkImageGenerator {
public:
- VideoImageGenerator(const scoped_refptr<VideoFrame>& frame) : frame_(frame) {
+ VideoImageGenerator(const scoped_refptr<VideoFrame>& frame)
+ : SkImageGenerator(
+ SkImageInfo::MakeN32Premul(frame->visible_rect().width(),
+ frame->visible_rect().height()))
+ , frame_(frame) {
DCHECK(frame_.get());
}
~VideoImageGenerator() override {}
@@ -178,14 +182,6 @@ class VideoImageGenerator : public SkImageGenerator {
void set_frame(const scoped_refptr<VideoFrame>& frame) { frame_ = frame; }
protected:
- bool onGetInfo(SkImageInfo* info) override {
- info->fWidth = frame_->visible_rect().width();
- info->fHeight = frame_->visible_rect().height();
- info->fColorType = kN32_SkColorType;
- info->fAlphaType = kPremul_SkAlphaType;
- return true;
- }
-
Result onGetPixels(const SkImageInfo& info,
void* pixels,
size_t row_bytes,
« no previous file with comments | « no previous file | skia/config/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698