OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 namespace content { | 77 namespace content { |
78 namespace { | 78 namespace { |
79 | 79 |
80 // FIXME: It would be great if there was a reusable mock SingleThreadTaskRunner | 80 // FIXME: It would be great if there was a reusable mock SingleThreadTaskRunner |
81 class TestTaskCounter : public base::SingleThreadTaskRunner { | 81 class TestTaskCounter : public base::SingleThreadTaskRunner { |
82 public: | 82 public: |
83 TestTaskCounter() : count_(0) {} | 83 TestTaskCounter() : count_(0) {} |
84 | 84 |
85 // SingleThreadTaskRunner implementation. | 85 // SingleThreadTaskRunner implementation. |
86 bool PostDelayedTask(const tracked_objects::Location&, | 86 bool PostDelayedTask(const tracked_objects::Location&, |
87 const base::Closure&, | 87 base::Closure, |
88 base::TimeDelta) override { | 88 base::TimeDelta) override { |
89 base::AutoLock auto_lock(lock_); | 89 base::AutoLock auto_lock(lock_); |
90 count_++; | 90 count_++; |
91 return true; | 91 return true; |
92 } | 92 } |
93 | 93 |
94 bool PostNonNestableDelayedTask(const tracked_objects::Location&, | 94 bool PostNonNestableDelayedTask(const tracked_objects::Location&, |
95 const base::Closure&, | 95 base::Closure, |
96 base::TimeDelta) override { | 96 base::TimeDelta) override { |
97 base::AutoLock auto_lock(lock_); | 97 base::AutoLock auto_lock(lock_); |
98 count_++; | 98 count_++; |
99 return true; | 99 return true; |
100 } | 100 } |
101 | 101 |
102 bool RunsTasksOnCurrentThread() const override { return true; } | 102 bool RunsTasksOnCurrentThread() const override { return true; } |
103 | 103 |
104 int NumTasksPosted() const { | 104 int NumTasksPosted() const { |
105 base::AutoLock auto_lock(lock_); | 105 base::AutoLock auto_lock(lock_); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 // These formats are guaranteed to work on all platforms. | 393 // These formats are guaranteed to work on all platforms. |
394 ::testing::Values(gfx::BufferFormat::R_8, | 394 ::testing::Values(gfx::BufferFormat::R_8, |
395 gfx::BufferFormat::BGR_565, | 395 gfx::BufferFormat::BGR_565, |
396 gfx::BufferFormat::RGBA_4444, | 396 gfx::BufferFormat::RGBA_4444, |
397 gfx::BufferFormat::RGBA_8888, | 397 gfx::BufferFormat::RGBA_8888, |
398 gfx::BufferFormat::BGRA_8888, | 398 gfx::BufferFormat::BGRA_8888, |
399 gfx::BufferFormat::YVU_420))); | 399 gfx::BufferFormat::YVU_420))); |
400 | 400 |
401 } // namespace | 401 } // namespace |
402 } // namespace content | 402 } // namespace content |
OLD | NEW |