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

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

Issue 362073002: cc: Remove all traces of SkPicture cloning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/resources/picture.h » ('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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 ResourceProvider* resource_provider() const { 46 ResourceProvider* resource_provider() const {
47 return resource_provider_.get(); 47 return resource_provider_.get();
48 } 48 }
49 49
50 SoftwareRenderer* renderer() const { return renderer_.get(); } 50 SoftwareRenderer* renderer() const { return renderer_.get(); }
51 51
52 // RendererClient implementation. 52 // RendererClient implementation.
53 virtual void SetFullRootLayerDamage() OVERRIDE {} 53 virtual void SetFullRootLayerDamage() OVERRIDE {}
54 virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) OVERRIDE {}
55 54
56 scoped_ptr<SkBitmap> DrawAndCopyOutput(RenderPassList* list, 55 scoped_ptr<SkBitmap> DrawAndCopyOutput(RenderPassList* list,
57 float device_scale_factor, 56 float device_scale_factor,
58 gfx::Rect device_viewport_rect) { 57 gfx::Rect device_viewport_rect) {
59 scoped_ptr<SkBitmap> bitmap_result; 58 scoped_ptr<SkBitmap> bitmap_result;
60 base::RunLoop loop; 59 base::RunLoop loop;
61 60
62 list->back()->copy_requests.push_back( 61 list->back()->copy_requests.push_back(
63 CopyOutputRequest::CreateBitmapRequest( 62 CopyOutputRequest::CreateBitmapRequest(
64 base::Bind(&SoftwareRendererTest::SaveBitmapResult, 63 base::Bind(&SoftwareRendererTest::SaveBitmapResult,
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 EXPECT_EQ( 427 EXPECT_EQ(
429 SK_ColorMAGENTA, 428 SK_ColorMAGENTA,
430 output->getColor(interior_visible_rect.x(), interior_visible_rect.y())); 429 output->getColor(interior_visible_rect.x(), interior_visible_rect.y()));
431 EXPECT_EQ(SK_ColorMAGENTA, 430 EXPECT_EQ(SK_ColorMAGENTA,
432 output->getColor(interior_visible_rect.right() - 1, 431 output->getColor(interior_visible_rect.right() - 1,
433 interior_visible_rect.bottom() - 1)); 432 interior_visible_rect.bottom() - 1));
434 } 433 }
435 434
436 } // namespace 435 } // namespace
437 } // namespace cc 436 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/resources/picture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698