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

Side by Side Diff: cc/surfaces/surfaces_pixeltest.cc

Issue 332873005: Rendering context information added to SharedQuadState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer_tree_json_parser fix Created 6 years, 6 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
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/test/layer_tree_host_common_test.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/compositor_frame.h" 5 #include "cc/output/compositor_frame.h"
6 #include "cc/quads/render_pass.h" 6 #include "cc/quads/render_pass.h"
7 #include "cc/quads/solid_color_draw_quad.h" 7 #include "cc/quads/solid_color_draw_quad.h"
8 #include "cc/quads/surface_draw_quad.h" 8 #include "cc/quads/surface_draw_quad.h"
9 #include "cc/surfaces/surface.h" 9 #include "cc/surfaces/surface.h"
10 #include "cc/surfaces/surface_aggregator.h" 10 #include "cc/surfaces/surface_aggregator.h"
(...skipping 22 matching lines...) Expand all
33 bool is_clipped = false; 33 bool is_clipped = false;
34 float opacity = 1.f; 34 float opacity = 1.f;
35 const SkXfermode::Mode blend_mode = SkXfermode::kSrcOver_Mode; 35 const SkXfermode::Mode blend_mode = SkXfermode::kSrcOver_Mode;
36 SharedQuadState* shared_state = render_pass->CreateAndAppendSharedQuadState(); 36 SharedQuadState* shared_state = render_pass->CreateAndAppendSharedQuadState();
37 shared_state->SetAll(transform, 37 shared_state->SetAll(transform,
38 content_bounds, 38 content_bounds,
39 visible_content_rect, 39 visible_content_rect,
40 clip_rect, 40 clip_rect,
41 is_clipped, 41 is_clipped,
42 opacity, 42 opacity,
43 blend_mode); 43 blend_mode,
44 0);
44 return shared_state; 45 return shared_state;
45 } 46 }
46 47
47 // Draws a very simple frame with no surface references. 48 // Draws a very simple frame with no surface references.
48 TEST_F(SurfacesPixelTest, DrawSimpleFrame) { 49 TEST_F(SurfacesPixelTest, DrawSimpleFrame) {
49 gfx::Rect rect(device_viewport_size_); 50 gfx::Rect rect(device_viewport_size_);
50 RenderPass::Id id(1, 1); 51 RenderPass::Id id(1, 1);
51 scoped_ptr<RenderPass> pass = RenderPass::Create(); 52 scoped_ptr<RenderPass> pass = RenderPass::Create();
52 pass->SetNew(id, rect, rect, gfx::Transform()); 53 pass->SetNew(id, rect, rect, gfx::Transform());
53 54
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 EXPECT_TRUE(RunPixelTest( 303 EXPECT_TRUE(RunPixelTest(
303 pass_list, 304 pass_list,
304 base::FilePath(FILE_PATH_LITERAL("four_blue_green_checkers.png")), 305 base::FilePath(FILE_PATH_LITERAL("four_blue_green_checkers.png")),
305 pixel_comparator)); 306 pixel_comparator));
306 } 307 }
307 308
308 } // namespace 309 } // namespace
309 } // namespace cc 310 } // namespace cc
310 311
311 #endif // !defined(OS_ANDROID) 312 #endif // !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/test/layer_tree_host_common_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698