| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 namespace content { | 76 namespace content { |
| 77 namespace { | 77 namespace { |
| 78 | 78 |
| 79 // FIXME: It would be great if there was a reusable mock SingleThreadTaskRunner | 79 // FIXME: It would be great if there was a reusable mock SingleThreadTaskRunner |
| 80 class TestTaskCounter : public base::SingleThreadTaskRunner { | 80 class TestTaskCounter : public base::SingleThreadTaskRunner { |
| 81 public: | 81 public: |
| 82 TestTaskCounter() : count_(0) {} | 82 TestTaskCounter() : count_(0) {} |
| 83 | 83 |
| 84 // SingleThreadTaskRunner implementation. | 84 // SingleThreadTaskRunner implementation. |
| 85 bool PostDelayedTask(const tracked_objects::Location&, | 85 bool PostDelayedTask(const tracked_objects::Location&, |
| 86 const base::Closure&, | 86 base::Closure, |
| 87 base::TimeDelta) override { | 87 base::TimeDelta) override { |
| 88 base::AutoLock auto_lock(lock_); | 88 base::AutoLock auto_lock(lock_); |
| 89 count_++; | 89 count_++; |
| 90 return true; | 90 return true; |
| 91 } | 91 } |
| 92 | 92 |
| 93 bool PostNonNestableDelayedTask(const tracked_objects::Location&, | 93 bool PostNonNestableDelayedTask(const tracked_objects::Location&, |
| 94 const base::Closure&, | 94 base::Closure, |
| 95 base::TimeDelta) override { | 95 base::TimeDelta) override { |
| 96 base::AutoLock auto_lock(lock_); | 96 base::AutoLock auto_lock(lock_); |
| 97 count_++; | 97 count_++; |
| 98 return true; | 98 return true; |
| 99 } | 99 } |
| 100 | 100 |
| 101 bool RunsTasksOnCurrentThread() const override { return true; } | 101 bool RunsTasksOnCurrentThread() const override { return true; } |
| 102 | 102 |
| 103 int NumTasksPosted() const { | 103 int NumTasksPosted() const { |
| 104 base::AutoLock auto_lock(lock_); | 104 base::AutoLock auto_lock(lock_); |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 // These formats are guaranteed to work on all platforms. | 385 // These formats are guaranteed to work on all platforms. |
| 386 ::testing::Values(gfx::BufferFormat::R_8, | 386 ::testing::Values(gfx::BufferFormat::R_8, |
| 387 gfx::BufferFormat::BGR_565, | 387 gfx::BufferFormat::BGR_565, |
| 388 gfx::BufferFormat::RGBA_4444, | 388 gfx::BufferFormat::RGBA_4444, |
| 389 gfx::BufferFormat::RGBA_8888, | 389 gfx::BufferFormat::RGBA_8888, |
| 390 gfx::BufferFormat::BGRA_8888, | 390 gfx::BufferFormat::BGRA_8888, |
| 391 gfx::BufferFormat::YVU_420))); | 391 gfx::BufferFormat::YVU_420))); |
| 392 | 392 |
| 393 } // namespace | 393 } // namespace |
| 394 } // namespace content | 394 } // namespace content |
| OLD | NEW |