| 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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 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 resource_provider_ = | 36 resource_provider_ = |
| 37 ResourceProvider::Create(output_surface_.get(), NULL, 0, false); | 37 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); |
| 38 renderer_ = SoftwareRenderer::Create( | 38 renderer_ = SoftwareRenderer::Create( |
| 39 this, &settings_, output_surface_.get(), resource_provider()); | 39 this, &settings_, output_surface_.get(), resource_provider()); |
| 40 } | 40 } |
| 41 | 41 |
| 42 ResourceProvider* resource_provider() const { | 42 ResourceProvider* resource_provider() const { |
| 43 return resource_provider_.get(); | 43 return resource_provider_.get(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 SoftwareRenderer* renderer() const { return renderer_.get(); } | 46 SoftwareRenderer* renderer() const { return renderer_.get(); } |
| 47 | 47 |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 EXPECT_EQ( | 397 EXPECT_EQ( |
| 398 SK_ColorMAGENTA, | 398 SK_ColorMAGENTA, |
| 399 output.getColor(interior_visible_rect.x(), interior_visible_rect.y())); | 399 output.getColor(interior_visible_rect.x(), interior_visible_rect.y())); |
| 400 EXPECT_EQ(SK_ColorMAGENTA, | 400 EXPECT_EQ(SK_ColorMAGENTA, |
| 401 output.getColor(interior_visible_rect.right() - 1, | 401 output.getColor(interior_visible_rect.right() - 1, |
| 402 interior_visible_rect.bottom() - 1)); | 402 interior_visible_rect.bottom() - 1)); |
| 403 } | 403 } |
| 404 | 404 |
| 405 } // namespace | 405 } // namespace |
| 406 } // namespace cc | 406 } // namespace cc |
| OLD | NEW |