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

Side by Side Diff: media/filters/skcanvas_video_renderer.cc

Issue 229453004: Rename VideoFrame::{Get,Set}Timestamp() to {set_}timestamp(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile failure Created 6 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 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 "media/filters/skcanvas_video_renderer.h" 5 #include "media/filters/skcanvas_video_renderer.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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 315
316 // Scale and convert to RGB in one step if we can. 316 // Scale and convert to RGB in one step if we can.
317 if (CanFastPaint(canvas, alpha, video_frame->format())) { 317 if (CanFastPaint(canvas, alpha, video_frame->format())) {
318 FastPaint(video_frame, canvas, dest); 318 FastPaint(video_frame, canvas, dest);
319 return; 319 return;
320 } 320 }
321 321
322 // Check if we should convert and update |last_frame_|. 322 // Check if we should convert and update |last_frame_|.
323 if (last_frame_.isNull() || 323 if (last_frame_.isNull() ||
324 video_frame->GetTimestamp() != last_frame_timestamp_) { 324 video_frame->timestamp() != last_frame_timestamp_) {
325 ConvertVideoFrameToBitmap(video_frame, &last_frame_); 325 ConvertVideoFrameToBitmap(video_frame, &last_frame_);
326 last_frame_timestamp_ = video_frame->GetTimestamp(); 326 last_frame_timestamp_ = video_frame->timestamp();
327 } 327 }
328 328
329 // Do a slower paint using |last_frame_|. 329 // Do a slower paint using |last_frame_|.
330 paint.setFilterBitmap(true); 330 paint.setFilterBitmap(true);
331 canvas->drawBitmapRect(last_frame_, NULL, dest, &paint); 331 canvas->drawBitmapRect(last_frame_, NULL, dest, &paint);
332 } 332 }
333 333
334 } // namespace media 334 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_video_decoder.cc ('k') | media/filters/skcanvas_video_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698