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

Side by Side Diff: media/capture/video/fake_video_capture_device.cc

Issue 2608513002: Remove mojo::String. (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « ios/web/webui/mojo_facade.mm ('k') | mojo/common/common_type_converters.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/capture/video/fake_video_capture_device.h" 5 #include "media/capture/video/fake_video_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "base/threading/thread_task_runner_handle.h" 15 #include "base/threading/thread_task_runner_handle.h"
16 #include "media/audio/fake_audio_input_stream.h" 16 #include "media/audio/fake_audio_input_stream.h"
17 #include "media/base/video_frame.h" 17 #include "media/base/video_frame.h"
18 #include "mojo/public/cpp/bindings/string.h"
19 #include "third_party/skia/include/core/SkBitmap.h" 18 #include "third_party/skia/include/core/SkBitmap.h"
20 #include "third_party/skia/include/core/SkCanvas.h" 19 #include "third_party/skia/include/core/SkCanvas.h"
21 #include "third_party/skia/include/core/SkMatrix.h" 20 #include "third_party/skia/include/core/SkMatrix.h"
22 #include "third_party/skia/include/core/SkPaint.h" 21 #include "third_party/skia/include/core/SkPaint.h"
23 #include "ui/gfx/codec/png_codec.h" 22 #include "ui/gfx/codec/png_codec.h"
24 23
25 namespace media { 24 namespace media {
26 25
27 // Sweep at 600 deg/sec. 26 // Sweep at 600 deg/sec.
28 static const float kPacmanAngularVelocity = 600; 27 static const float kPacmanAngularVelocity = 600;
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 // Don't accumulate any debt if we are lagging behind - just post the next 366 // Don't accumulate any debt if we are lagging behind - just post the next
368 // frame immediately and continue as normal. 367 // frame immediately and continue as normal.
369 const base::TimeTicks next_execution_time = 368 const base::TimeTicks next_execution_time =
370 std::max(current_time, expected_execution_time + frame_interval); 369 std::max(current_time, expected_execution_time + frame_interval);
371 const base::TimeDelta delay = next_execution_time - current_time; 370 const base::TimeDelta delay = next_execution_time - current_time;
372 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 371 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
373 FROM_HERE, base::Bind(next_capture, next_execution_time), delay); 372 FROM_HERE, base::Bind(next_capture, next_execution_time), delay);
374 } 373 }
375 374
376 } // namespace media 375 } // namespace media
OLDNEW
« no previous file with comments | « ios/web/webui/mojo_facade.mm ('k') | mojo/common/common_type_converters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698