OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/output/software_renderer.h" | 5 #include "cc/output/software_renderer.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "cc/output/compositor_frame_metadata.h" | 8 #include "cc/output/compositor_frame_metadata.h" |
9 #include "cc/output/copy_output_request.h" | 9 #include "cc/output/copy_output_request.h" |
10 #include "cc/output/copy_output_result.h" | 10 #include "cc/output/copy_output_result.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 class SoftwareRendererTest : public testing::Test, public RendererClient { | 30 class SoftwareRendererTest : public testing::Test, public RendererClient { |
31 public: | 31 public: |
32 void InitializeRenderer( | 32 void InitializeRenderer( |
33 scoped_ptr<SoftwareOutputDevice> software_output_device) { | 33 scoped_ptr<SoftwareOutputDevice> software_output_device) { |
34 output_surface_ = FakeOutputSurface::CreateSoftware( | 34 output_surface_ = FakeOutputSurface::CreateSoftware( |
35 software_output_device.Pass()); | 35 software_output_device.Pass()); |
36 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 36 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
37 | 37 |
38 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 38 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
39 resource_provider_ = ResourceProvider::Create( | 39 resource_provider_ = ResourceProvider::Create(output_surface_.get(), |
40 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, | 40 shared_bitmap_manager_.get(), |
41 false); | 41 NULL, |
| 42 0, |
| 43 false, |
| 44 1, |
| 45 false); |
42 renderer_ = SoftwareRenderer::Create( | 46 renderer_ = SoftwareRenderer::Create( |
43 this, &settings_, output_surface_.get(), resource_provider()); | 47 this, &settings_, output_surface_.get(), resource_provider()); |
44 } | 48 } |
45 | 49 |
46 ResourceProvider* resource_provider() const { | 50 ResourceProvider* resource_provider() const { |
47 return resource_provider_.get(); | 51 return resource_provider_.get(); |
48 } | 52 } |
49 | 53 |
50 SoftwareRenderer* renderer() const { return renderer_.get(); } | 54 SoftwareRenderer* renderer() const { return renderer_.get(); } |
51 | 55 |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 EXPECT_EQ( | 431 EXPECT_EQ( |
428 SK_ColorMAGENTA, | 432 SK_ColorMAGENTA, |
429 output->getColor(interior_visible_rect.x(), interior_visible_rect.y())); | 433 output->getColor(interior_visible_rect.x(), interior_visible_rect.y())); |
430 EXPECT_EQ(SK_ColorMAGENTA, | 434 EXPECT_EQ(SK_ColorMAGENTA, |
431 output->getColor(interior_visible_rect.right() - 1, | 435 output->getColor(interior_visible_rect.right() - 1, |
432 interior_visible_rect.bottom() - 1)); | 436 interior_visible_rect.bottom() - 1)); |
433 } | 437 } |
434 | 438 |
435 } // namespace | 439 } // namespace |
436 } // namespace cc | 440 } // namespace cc |
OLD | NEW |