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 21 matching lines...) Expand all Loading... |
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(output_surface_.get(), | 39 resource_provider_ = ResourceProvider::Create(output_surface_.get(), |
40 shared_bitmap_manager_.get(), | 40 shared_bitmap_manager_.get(), |
41 NULL, | 41 NULL, |
| 42 NULL, |
42 0, | 43 0, |
43 false, | 44 false, |
44 1, | 45 1, |
45 false); | 46 false); |
46 renderer_ = SoftwareRenderer::Create( | 47 renderer_ = SoftwareRenderer::Create( |
47 this, &settings_, output_surface_.get(), resource_provider()); | 48 this, &settings_, output_surface_.get(), resource_provider()); |
48 } | 49 } |
49 | 50 |
50 ResourceProvider* resource_provider() const { | 51 ResourceProvider* resource_provider() const { |
51 return resource_provider_.get(); | 52 return resource_provider_.get(); |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 EXPECT_EQ( | 432 EXPECT_EQ( |
432 SK_ColorMAGENTA, | 433 SK_ColorMAGENTA, |
433 output->getColor(interior_visible_rect.x(), interior_visible_rect.y())); | 434 output->getColor(interior_visible_rect.x(), interior_visible_rect.y())); |
434 EXPECT_EQ(SK_ColorMAGENTA, | 435 EXPECT_EQ(SK_ColorMAGENTA, |
435 output->getColor(interior_visible_rect.right() - 1, | 436 output->getColor(interior_visible_rect.right() - 1, |
436 interior_visible_rect.bottom() - 1)); | 437 interior_visible_rect.bottom() - 1)); |
437 } | 438 } |
438 | 439 |
439 } // namespace | 440 } // namespace |
440 } // namespace cc | 441 } // namespace cc |
OLD | NEW |