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 "cc/test/pixel_test.h" | 5 #include "cc/test/pixel_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 ? device_viewport_rect | 64 ? device_viewport_rect |
65 : external_device_clip_rect_; | 65 : external_device_clip_rect_; |
66 renderer_->DecideRenderPassAllocationsForFrame(*pass_list); | 66 renderer_->DecideRenderPassAllocationsForFrame(*pass_list); |
67 renderer_->DrawFrame(pass_list, | 67 renderer_->DrawFrame(pass_list, |
68 device_scale_factor, | 68 device_scale_factor, |
69 device_viewport_rect, | 69 device_viewport_rect, |
70 device_clip_rect, | 70 device_clip_rect, |
71 disable_picture_quad_image_filtering_); | 71 disable_picture_quad_image_filtering_); |
72 | 72 |
73 // Wait for the readback to complete. | 73 // Wait for the readback to complete. |
74 resource_provider_->Finish(); | 74 resource_provider_->GetResourceHelper()->Finish(); |
danakj
2014/07/09 16:01:33
can we just call gl->Finish() directly?
sohanjg
2014/07/10 15:11:06
Done.
| |
75 run_loop.Run(); | 75 run_loop.Run(); |
76 | 76 |
77 return PixelsMatchReference(ref_file, comparator); | 77 return PixelsMatchReference(ref_file, comparator); |
78 } | 78 } |
79 | 79 |
80 void PixelTest::ReadbackResult(base::Closure quit_run_loop, | 80 void PixelTest::ReadbackResult(base::Closure quit_run_loop, |
81 scoped_ptr<CopyOutputResult> result) { | 81 scoped_ptr<CopyOutputResult> result) { |
82 ASSERT_TRUE(result->HasBitmap()); | 82 ASSERT_TRUE(result->HasBitmap()); |
83 result_bitmap_ = result->TakeBitmap().Pass(); | 83 result_bitmap_ = result->TakeBitmap().Pass(); |
84 quit_run_loop.Run(); | 84 quit_run_loop.Run(); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 178 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
179 resource_provider_ = ResourceProvider::Create( | 179 resource_provider_ = ResourceProvider::Create( |
180 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, false); | 180 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, false); |
181 renderer_ = | 181 renderer_ = |
182 SoftwareRenderer::Create( | 182 SoftwareRenderer::Create( |
183 this, &settings_, output_surface_.get(), resource_provider_.get()) | 183 this, &settings_, output_surface_.get(), resource_provider_.get()) |
184 .PassAs<DirectRenderer>(); | 184 .PassAs<DirectRenderer>(); |
185 } | 185 } |
186 | 186 |
187 } // namespace cc | 187 } // namespace cc |
OLD | NEW |