Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: cc/output/software_renderer_unittest.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/resources/bitmap_raster_worker_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/resources/bitmap_raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698