| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 79 | 79 | 
| 80   static void SaveBitmapResult(scoped_ptr<SkBitmap>* bitmap_result, | 80   static void SaveBitmapResult(scoped_ptr<SkBitmap>* bitmap_result, | 
| 81                                const base::Closure& quit_closure, | 81                                const base::Closure& quit_closure, | 
| 82                                scoped_ptr<CopyOutputResult> result) { | 82                                scoped_ptr<CopyOutputResult> result) { | 
| 83     DCHECK(result->HasBitmap()); | 83     DCHECK(result->HasBitmap()); | 
| 84     *bitmap_result = result->TakeBitmap(); | 84     *bitmap_result = result->TakeBitmap(); | 
| 85     quit_closure.Run(); | 85     quit_closure.Run(); | 
| 86   } | 86   } | 
| 87 | 87 | 
| 88  protected: | 88  protected: | 
| 89   LayerTreeSettings settings_; | 89   RendererSettings settings_; | 
| 90   FakeOutputSurfaceClient output_surface_client_; | 90   FakeOutputSurfaceClient output_surface_client_; | 
| 91   scoped_ptr<FakeOutputSurface> output_surface_; | 91   scoped_ptr<FakeOutputSurface> output_surface_; | 
| 92   scoped_ptr<SharedBitmapManager> shared_bitmap_manager_; | 92   scoped_ptr<SharedBitmapManager> shared_bitmap_manager_; | 
| 93   scoped_ptr<ResourceProvider> resource_provider_; | 93   scoped_ptr<ResourceProvider> resource_provider_; | 
| 94   scoped_ptr<SoftwareRenderer> renderer_; | 94   scoped_ptr<SoftwareRenderer> renderer_; | 
| 95 }; | 95 }; | 
| 96 | 96 | 
| 97 TEST_F(SoftwareRendererTest, SolidColorQuad) { | 97 TEST_F(SoftwareRendererTest, SolidColorQuad) { | 
| 98   gfx::Size outer_size(100, 100); | 98   gfx::Size outer_size(100, 100); | 
| 99   gfx::Size inner_size(98, 98); | 99   gfx::Size inner_size(98, 98); | 
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 431   EXPECT_EQ( | 431   EXPECT_EQ( | 
| 432       SK_ColorMAGENTA, | 432       SK_ColorMAGENTA, | 
| 433       output->getColor(interior_visible_rect.x(), interior_visible_rect.y())); | 433       output->getColor(interior_visible_rect.x(), interior_visible_rect.y())); | 
| 434   EXPECT_EQ(SK_ColorMAGENTA, | 434   EXPECT_EQ(SK_ColorMAGENTA, | 
| 435             output->getColor(interior_visible_rect.right() - 1, | 435             output->getColor(interior_visible_rect.right() - 1, | 
| 436                              interior_visible_rect.bottom() - 1)); | 436                              interior_visible_rect.bottom() - 1)); | 
| 437 } | 437 } | 
| 438 | 438 | 
| 439 }  // namespace | 439 }  // namespace | 
| 440 }  // namespace cc | 440 }  // namespace cc | 
| OLD | NEW | 
|---|