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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 this, &settings_, output_surface_.get(), resource_provider()); | 48 this, &settings_, output_surface_.get(), resource_provider()); |
49 } | 49 } |
50 | 50 |
51 ResourceProvider* resource_provider() const { | 51 ResourceProvider* resource_provider() const { |
52 return resource_provider_.get(); | 52 return resource_provider_.get(); |
53 } | 53 } |
54 | 54 |
55 SoftwareRenderer* renderer() const { return renderer_.get(); } | 55 SoftwareRenderer* renderer() const { return renderer_.get(); } |
56 | 56 |
57 // RendererClient implementation. | 57 // RendererClient implementation. |
58 virtual void SetFullRootLayerDamage() override {} | 58 void SetFullRootLayerDamage() override {} |
59 | 59 |
60 scoped_ptr<SkBitmap> DrawAndCopyOutput(RenderPassList* list, | 60 scoped_ptr<SkBitmap> DrawAndCopyOutput(RenderPassList* list, |
61 float device_scale_factor, | 61 float device_scale_factor, |
62 gfx::Rect device_viewport_rect) { | 62 gfx::Rect device_viewport_rect) { |
63 scoped_ptr<SkBitmap> bitmap_result; | 63 scoped_ptr<SkBitmap> bitmap_result; |
64 base::RunLoop loop; | 64 base::RunLoop loop; |
65 | 65 |
66 list->back()->copy_requests.push_back( | 66 list->back()->copy_requests.push_back( |
67 CopyOutputRequest::CreateBitmapRequest( | 67 CopyOutputRequest::CreateBitmapRequest( |
68 base::Bind(&SoftwareRendererTest::SaveBitmapResult, | 68 base::Bind(&SoftwareRendererTest::SaveBitmapResult, |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 EXPECT_EQ( | 432 EXPECT_EQ( |
433 SK_ColorMAGENTA, | 433 SK_ColorMAGENTA, |
434 output->getColor(interior_visible_rect.x(), interior_visible_rect.y())); | 434 output->getColor(interior_visible_rect.x(), interior_visible_rect.y())); |
435 EXPECT_EQ(SK_ColorMAGENTA, | 435 EXPECT_EQ(SK_ColorMAGENTA, |
436 output->getColor(interior_visible_rect.right() - 1, | 436 output->getColor(interior_visible_rect.right() - 1, |
437 interior_visible_rect.bottom() - 1)); | 437 interior_visible_rect.bottom() - 1)); |
438 } | 438 } |
439 | 439 |
440 } // namespace | 440 } // namespace |
441 } // namespace cc | 441 } // namespace cc |
OLD | NEW |