| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 void InitializeRenderer( | 35 void InitializeRenderer( |
| 36 std::unique_ptr<SoftwareOutputDevice> software_output_device) { | 36 std::unique_ptr<SoftwareOutputDevice> software_output_device) { |
| 37 output_surface_ = | 37 output_surface_ = |
| 38 FakeOutputSurface::CreateSoftware(std::move(software_output_device)); | 38 FakeOutputSurface::CreateSoftware(std::move(software_output_device)); |
| 39 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 39 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
| 40 | 40 |
| 41 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 41 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
| 42 resource_provider_ = FakeResourceProvider::Create( | 42 resource_provider_ = FakeResourceProvider::Create( |
| 43 output_surface_.get(), shared_bitmap_manager_.get()); | 43 output_surface_.get(), shared_bitmap_manager_.get()); |
| 44 renderer_ = SoftwareRenderer::Create( | 44 renderer_ = SoftwareRenderer::Create( |
| 45 this, &settings_, output_surface_.get(), resource_provider()); | 45 this, &settings_, output_surface_.get(), resource_provider(), |
| 46 true /* use_image_hijack_canvas */); |
| 46 } | 47 } |
| 47 | 48 |
| 48 ResourceProvider* resource_provider() const { | 49 ResourceProvider* resource_provider() const { |
| 49 return resource_provider_.get(); | 50 return resource_provider_.get(); |
| 50 } | 51 } |
| 51 | 52 |
| 52 SoftwareRenderer* renderer() const { return renderer_.get(); } | 53 SoftwareRenderer* renderer() const { return renderer_.get(); } |
| 53 | 54 |
| 54 // RendererClient implementation. | 55 // RendererClient implementation. |
| 55 void SetFullRootLayerDamage() override {} | 56 void SetFullRootLayerDamage() override {} |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 EXPECT_EQ( | 394 EXPECT_EQ( |
| 394 SK_ColorMAGENTA, | 395 SK_ColorMAGENTA, |
| 395 output->getColor(interior_visible_rect.x(), interior_visible_rect.y())); | 396 output->getColor(interior_visible_rect.x(), interior_visible_rect.y())); |
| 396 EXPECT_EQ(SK_ColorMAGENTA, | 397 EXPECT_EQ(SK_ColorMAGENTA, |
| 397 output->getColor(interior_visible_rect.right() - 1, | 398 output->getColor(interior_visible_rect.right() - 1, |
| 398 interior_visible_rect.bottom() - 1)); | 399 interior_visible_rect.bottom() - 1)); |
| 399 } | 400 } |
| 400 | 401 |
| 401 } // namespace | 402 } // namespace |
| 402 } // namespace cc | 403 } // namespace cc |
| OLD | NEW |