| 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 "base/location.h" | 5 #include "base/location.h" |
| 6 #include "base/thread_task_runner_handle.h" | 6 #include "base/thread_task_runner_handle.h" |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "cc/debug/lap_timer.h" | 8 #include "cc/debug/lap_timer.h" |
| 9 #include "cc/raster/raster_buffer.h" | 9 #include "cc/raster/raster_buffer.h" |
| 10 #include "cc/test/begin_frame_args_test.h" | 10 #include "cc/test/begin_frame_args_test.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 it != completed_tasks_.end(); | 55 it != completed_tasks_.end(); |
| 56 ++it) { | 56 ++it) { |
| 57 RasterTask* task = it->get(); | 57 RasterTask* task = it->get(); |
| 58 | 58 |
| 59 task->WillComplete(); | 59 task->WillComplete(); |
| 60 task->CompleteOnOriginThread(this); | 60 task->CompleteOnOriginThread(this); |
| 61 task->DidComplete(); | 61 task->DidComplete(); |
| 62 } | 62 } |
| 63 completed_tasks_.clear(); | 63 completed_tasks_.clear(); |
| 64 } | 64 } |
| 65 ResourceFormat GetResourceFormat() const override { return RGBA_8888; } | 65 ResourceFormat GetResourceFormat(bool must_support_alpha) const override { |
| 66 bool GetResourceRequiresSwizzle() const override { | 66 return RGBA_8888; |
| 67 return !PlatformColor::SameComponentOrder(GetResourceFormat()); | 67 } |
| 68 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override { |
| 69 return !PlatformColor::SameComponentOrder( |
| 70 GetResourceFormat(must_support_alpha)); |
| 68 } | 71 } |
| 69 | 72 |
| 70 // Overridden from TileTaskClient: | 73 // Overridden from TileTaskClient: |
| 71 scoped_ptr<RasterBuffer> AcquireBufferForRaster( | 74 scoped_ptr<RasterBuffer> AcquireBufferForRaster( |
| 72 const Resource* resource, | 75 const Resource* resource, |
| 73 uint64_t new_content_id, | 76 uint64_t new_content_id, |
| 74 uint64_t previous_content_id) override { | 77 uint64_t previous_content_id) override { |
| 75 return nullptr; | 78 return nullptr; |
| 76 } | 79 } |
| 77 void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {} | 80 void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {} |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); | 475 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); |
| 473 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 476 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
| 474 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 477 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
| 475 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 478 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
| 476 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 479 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
| 477 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 480 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
| 478 } | 481 } |
| 479 | 482 |
| 480 } // namespace | 483 } // namespace |
| 481 } // namespace cc | 484 } // namespace cc |
| OLD | NEW |