diff options
author | reed <reed@chromium.org> | 2015-05-04 21:04:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-05 04:05:24 +0000 |
commit | 4b06412d951cf97fc0547e49d8582f47e1e36d76 (patch) | |
tree | 3c70248be8c9987b5a9e4396a4025a2b7d0fe8b9 /media | |
parent | 861e7ec31c1917c3c7447356be2a8a26cf8588b3 (diff) | |
download | chromium_src-4b06412d951cf97fc0547e49d8582f47e1e36d76.zip chromium_src-4b06412d951cf97fc0547e49d8582f47e1e36d76.tar.gz chromium_src-4b06412d951cf97fc0547e49d8582f47e1e36d76.tar.bz2 |
onGetInfo is deprecated, just pass info to constructor
no functionality change, just refactoring.
BUG=
Review URL: https://codereview.chromium.org/1125573002
Cr-Commit-Position: refs/heads/master@{#328272}
Diffstat (limited to 'media')
-rw-r--r-- | media/blink/skcanvas_video_renderer.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/media/blink/skcanvas_video_renderer.cc b/media/blink/skcanvas_video_renderer.cc index bbfeef8..fdb4d9a 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, |