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