| OLD | NEW |
| 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 } | 333 } |
| 334 | 334 |
| 335 // Check if we should convert and update |last_frame_|. | 335 // Check if we should convert and update |last_frame_|. |
| 336 if (last_frame_.isNull() || | 336 if (last_frame_.isNull() || |
| 337 video_frame->timestamp() != last_frame_timestamp_) { | 337 video_frame->timestamp() != last_frame_timestamp_) { |
| 338 ConvertVideoFrameToBitmap(video_frame, &last_frame_); | 338 ConvertVideoFrameToBitmap(video_frame, &last_frame_); |
| 339 last_frame_timestamp_ = video_frame->timestamp(); | 339 last_frame_timestamp_ = video_frame->timestamp(); |
| 340 } | 340 } |
| 341 | 341 |
| 342 // Do a slower paint using |last_frame_|. | 342 // Do a slower paint using |last_frame_|. |
| 343 paint.setFilterBitmap(true); | 343 paint.setFilterLevel(SkPaint::kLow_FilterLevel); |
| 344 canvas->drawBitmapRect(last_frame_, NULL, dest, &paint); | 344 canvas->drawBitmapRect(last_frame_, NULL, dest, &paint); |
| 345 } | 345 } |
| 346 | 346 |
| 347 } // namespace media | 347 } // namespace media |
| OLD | NEW |