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

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

Issue 404563005: Make RenderPass::Id an isolated class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more case in mojo 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
« no previous file with comments | « cc/layers/render_surface_unittest.cc ('k') | cc/output/direct_renderer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/delegating_renderer.h" 5 #include "cc/output/delegating_renderer.h"
6 6
7 #include "cc/test/fake_output_surface.h" 7 #include "cc/test/fake_output_surface.h"
8 #include "cc/test/layer_tree_test.h" 8 #include "cc/test/layer_tree_test.h"
9 #include "cc/test/render_pass_test_common.h" 9 #include "cc/test/render_pass_test_common.h"
10 #include "cc/test/render_pass_test_utils.h" 10 #include "cc/test/render_pass_test_utils.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 virtual void AfterTest() OVERRIDE {} 90 virtual void AfterTest() OVERRIDE {}
91 91
92 virtual DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, 92 virtual DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
93 LayerTreeHostImpl::FrameData* frame, 93 LayerTreeHostImpl::FrameData* frame,
94 DrawResult draw_result) OVERRIDE { 94 DrawResult draw_result) OVERRIDE {
95 frame->render_passes.clear(); 95 frame->render_passes.clear();
96 frame->render_passes_by_id.clear(); 96 frame->render_passes_by_id.clear();
97 97
98 TestRenderPass* child_pass = AddRenderPass( 98 TestRenderPass* child_pass = AddRenderPass(&frame->render_passes,
99 &frame->render_passes, 99 RenderPassId(2, 1),
100 RenderPass::Id(2, 1), 100 gfx::Rect(3, 3, 10, 10),
101 gfx::Rect(3, 3, 10, 10), 101 gfx::Transform());
102 gfx::Transform()); 102 child_pass->AppendOneOfEveryQuadType(host_impl->resource_provider(),
103 child_pass->AppendOneOfEveryQuadType( 103 RenderPassId(0, 0));
104 host_impl->resource_provider(), RenderPass::Id(0, 0));
105 104
106 TestRenderPass* pass = AddRenderPass( 105 TestRenderPass* pass = AddRenderPass(&frame->render_passes,
107 &frame->render_passes, 106 RenderPassId(1, 1),
108 RenderPass::Id(1, 1), 107 gfx::Rect(3, 3, 10, 10),
109 gfx::Rect(3, 3, 10, 10), 108 gfx::Transform());
110 gfx::Transform());
111 pass->AppendOneOfEveryQuadType( 109 pass->AppendOneOfEveryQuadType(
112 host_impl->resource_provider(), child_pass->id); 110 host_impl->resource_provider(), child_pass->id);
113 return draw_result; 111 return draw_result;
114 } 112 }
115 113
116 virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { 114 virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
117 EXPECT_EQ(0u, output_surface_->num_sent_frames()); 115 EXPECT_EQ(0u, output_surface_->num_sent_frames());
118 } 116 }
119 117
120 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, 118 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
(...skipping 13 matching lines...) Expand all
134 EXPECT_EQ(24u, last_frame.delegated_frame_data->resource_list.size()); 132 EXPECT_EQ(24u, last_frame.delegated_frame_data->resource_list.size());
135 133
136 EndTest(); 134 EndTest();
137 } 135 }
138 }; 136 };
139 137
140 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F( 138 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(
141 DelegatingRendererTestResources); 139 DelegatingRendererTestResources);
142 140
143 } // namespace cc 141 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/render_surface_unittest.cc ('k') | cc/output/direct_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698