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

Side by Side Diff: webkit/media/video_renderer_impl.cc

Issue 9225001: Remove two static initializers (media/base/{buffers,media_log}.cc) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/media/video_renderer_impl.h" 5 #include "webkit/media/video_renderer_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/base/video_frame.h" 8 #include "media/base/video_frame.h"
9 #include "media/base/yuv_convert.h" 9 #include "media/base/yuv_convert.h"
10 #include "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 video_frame->height(), 223 video_frame->height(),
224 video_frame->stride(media::VideoFrame::kYPlane), 224 video_frame->stride(media::VideoFrame::kYPlane),
225 video_frame->stride(media::VideoFrame::kUPlane), 225 video_frame->stride(media::VideoFrame::kUPlane),
226 bitmap->rowBytes(), 226 bitmap->rowBytes(),
227 yuv_type); 227 yuv_type);
228 bitmap->notifyPixelsChanged(); 228 bitmap->notifyPixelsChanged();
229 bitmap->unlockPixels(); 229 bitmap->unlockPixels();
230 } 230 }
231 231
232 VideoRendererImpl::VideoRendererImpl() 232 VideoRendererImpl::VideoRendererImpl()
233 : last_frame_timestamp_(media::kNoTimestamp) { 233 : last_frame_timestamp_(media::kNoTimestamp()) {
234 } 234 }
235 235
236 VideoRendererImpl::~VideoRendererImpl() {} 236 VideoRendererImpl::~VideoRendererImpl() {}
237 237
238 void VideoRendererImpl::Paint(media::VideoFrame* video_frame, 238 void VideoRendererImpl::Paint(media::VideoFrame* video_frame,
239 SkCanvas* canvas, 239 SkCanvas* canvas,
240 const gfx::Rect& dest_rect) { 240 const gfx::Rect& dest_rect) {
241 // Paint black rectangle if there isn't a frame available. 241 // Paint black rectangle if there isn't a frame available.
242 if (!video_frame) { 242 if (!video_frame) {
243 SkPaint paint; 243 SkPaint paint;
(...skipping 18 matching lines...) Expand all
262 video_frame->GetTimestamp() != last_frame_timestamp_) { 262 video_frame->GetTimestamp() != last_frame_timestamp_) {
263 ConvertVideoFrameToBitmap(video_frame, &last_frame_); 263 ConvertVideoFrameToBitmap(video_frame, &last_frame_);
264 last_frame_timestamp_ = video_frame->GetTimestamp(); 264 last_frame_timestamp_ = video_frame->GetTimestamp();
265 } 265 }
266 266
267 // Do a slower paint using |last_frame_|. 267 // Do a slower paint using |last_frame_|.
268 SlowPaint(last_frame_, canvas, dest_rect); 268 SlowPaint(last_frame_, canvas, dest_rect);
269 } 269 }
270 270
271 } // namespace webkit_media 271 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698