| 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/layers/quad_sink.h" | 8 #include "cc/layers/quad_sink.h" |
| 9 #include "cc/output/compositor_frame_metadata.h" | 9 #include "cc/output/compositor_frame_metadata.h" |
| 10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } | 45 } |
| 46 | 46 |
| 47 ResourceProvider* resource_provider() const { | 47 ResourceProvider* resource_provider() const { |
| 48 return resource_provider_.get(); | 48 return resource_provider_.get(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 SoftwareRenderer* renderer() const { return renderer_.get(); } | 51 SoftwareRenderer* renderer() const { return renderer_.get(); } |
| 52 | 52 |
| 53 // RendererClient implementation. | 53 // RendererClient implementation. |
| 54 virtual void SetFullRootLayerDamage() OVERRIDE {} | 54 virtual void SetFullRootLayerDamage() OVERRIDE {} |
| 55 virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) OVERRIDE {} |
| 55 | 56 |
| 56 scoped_ptr<SkBitmap> DrawAndCopyOutput(RenderPassList* list, | 57 scoped_ptr<SkBitmap> DrawAndCopyOutput(RenderPassList* list, |
| 57 float device_scale_factor, | 58 float device_scale_factor, |
| 58 gfx::Rect device_viewport_rect) { | 59 gfx::Rect device_viewport_rect) { |
| 59 scoped_ptr<SkBitmap> bitmap_result; | 60 scoped_ptr<SkBitmap> bitmap_result; |
| 60 base::RunLoop loop; | 61 base::RunLoop loop; |
| 61 | 62 |
| 62 list->back()->copy_requests.push_back( | 63 list->back()->copy_requests.push_back( |
| 63 CopyOutputRequest::CreateBitmapRequest( | 64 CopyOutputRequest::CreateBitmapRequest( |
| 64 base::Bind(&SoftwareRendererTest::SaveBitmapResult, | 65 base::Bind(&SoftwareRendererTest::SaveBitmapResult, |
| (...skipping 366 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 |