| 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 "cc/layers/quad_sink.h" | 7 #include "cc/layers/quad_sink.h" |
| 8 #include "cc/output/compositor_frame_metadata.h" | 8 #include "cc/output/compositor_frame_metadata.h" |
| 9 #include "cc/output/software_output_device.h" | 9 #include "cc/output/software_output_device.h" |
| 10 #include "cc/quads/render_pass.h" | 10 #include "cc/quads/render_pass.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 class SoftwareRendererTest : public testing::Test, public RendererClient { | 28 class SoftwareRendererTest : public testing::Test, public RendererClient { |
| 29 public: | 29 public: |
| 30 void InitializeRenderer( | 30 void InitializeRenderer( |
| 31 scoped_ptr<SoftwareOutputDevice> software_output_device) { | 31 scoped_ptr<SoftwareOutputDevice> software_output_device) { |
| 32 output_surface_ = FakeOutputSurface::CreateSoftware( | 32 output_surface_ = FakeOutputSurface::CreateSoftware( |
| 33 software_output_device.Pass()); | 33 software_output_device.Pass()); |
| 34 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 34 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
| 35 | 35 |
| 36 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 36 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
| 37 resource_provider_ = ResourceProvider::Create( | 37 resource_provider_ = ResourceProvider::Create( |
| 38 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1); | 38 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, |
| 39 false); |
| 39 renderer_ = SoftwareRenderer::Create( | 40 renderer_ = SoftwareRenderer::Create( |
| 40 this, &settings_, output_surface_.get(), resource_provider()); | 41 this, &settings_, output_surface_.get(), resource_provider()); |
| 41 } | 42 } |
| 42 | 43 |
| 43 ResourceProvider* resource_provider() const { | 44 ResourceProvider* resource_provider() const { |
| 44 return resource_provider_.get(); | 45 return resource_provider_.get(); |
| 45 } | 46 } |
| 46 | 47 |
| 47 SoftwareRenderer* renderer() const { return renderer_.get(); } | 48 SoftwareRenderer* renderer() const { return renderer_.get(); } |
| 48 | 49 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 EXPECT_EQ( | 426 EXPECT_EQ( |
| 426 SK_ColorMAGENTA, | 427 SK_ColorMAGENTA, |
| 427 output.getColor(interior_visible_rect.x(), interior_visible_rect.y())); | 428 output.getColor(interior_visible_rect.x(), interior_visible_rect.y())); |
| 428 EXPECT_EQ(SK_ColorMAGENTA, | 429 EXPECT_EQ(SK_ColorMAGENTA, |
| 429 output.getColor(interior_visible_rect.right() - 1, | 430 output.getColor(interior_visible_rect.right() - 1, |
| 430 interior_visible_rect.bottom() - 1)); | 431 interior_visible_rect.bottom() - 1)); |
| 431 } | 432 } |
| 432 | 433 |
| 433 } // namespace | 434 } // namespace |
| 434 } // namespace cc | 435 } // namespace cc |
| OLD | NEW |