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

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

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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
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/surfaces/surface_aggregator.h" 5 #include "cc/surfaces/surface_aggregator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ptr_util.h"
13 #include "cc/output/compositor_frame.h" 14 #include "cc/output/compositor_frame.h"
14 #include "cc/output/delegated_frame_data.h" 15 #include "cc/output/delegated_frame_data.h"
15 #include "cc/quads/render_pass.h" 16 #include "cc/quads/render_pass.h"
16 #include "cc/quads/render_pass_draw_quad.h" 17 #include "cc/quads/render_pass_draw_quad.h"
17 #include "cc/quads/solid_color_draw_quad.h" 18 #include "cc/quads/solid_color_draw_quad.h"
18 #include "cc/quads/surface_draw_quad.h" 19 #include "cc/quads/surface_draw_quad.h"
19 #include "cc/quads/texture_draw_quad.h" 20 #include "cc/quads/texture_draw_quad.h"
20 #include "cc/resources/shared_bitmap_manager.h" 21 #include "cc/resources/shared_bitmap_manager.h"
21 #include "cc/surfaces/surface.h" 22 #include "cc/surfaces/surface.h"
22 #include "cc/surfaces/surface_factory.h" 23 #include "cc/surfaces/surface_factory.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 SurfaceManager manager_; 75 SurfaceManager manager_;
75 EmptySurfaceFactoryClient empty_client_; 76 EmptySurfaceFactoryClient empty_client_;
76 SurfaceFactory factory_; 77 SurfaceFactory factory_;
77 SurfaceAggregator aggregator_; 78 SurfaceAggregator aggregator_;
78 }; 79 };
79 80
80 TEST_F(SurfaceAggregatorTest, ValidSurfaceNoFrame) { 81 TEST_F(SurfaceAggregatorTest, ValidSurfaceNoFrame) {
81 SurfaceId one_id(7); 82 SurfaceId one_id(7);
82 factory_.Create(one_id); 83 factory_.Create(one_id);
83 84
84 scoped_ptr<CompositorFrame> frame = aggregator_.Aggregate(one_id); 85 std::unique_ptr<CompositorFrame> frame = aggregator_.Aggregate(one_id);
85 EXPECT_FALSE(frame); 86 EXPECT_FALSE(frame);
86 87
87 factory_.Destroy(one_id); 88 factory_.Destroy(one_id);
88 } 89 }
89 90
90 class SurfaceAggregatorValidSurfaceTest : public SurfaceAggregatorTest { 91 class SurfaceAggregatorValidSurfaceTest : public SurfaceAggregatorTest {
91 public: 92 public:
92 explicit SurfaceAggregatorValidSurfaceTest(bool use_damage_rect) 93 explicit SurfaceAggregatorValidSurfaceTest(bool use_damage_rect)
93 : SurfaceAggregatorTest(use_damage_rect), 94 : SurfaceAggregatorTest(use_damage_rect),
94 allocator_(1u), 95 allocator_(1u),
(...skipping 10 matching lines...) Expand all
105 106
106 void TearDown() override { 107 void TearDown() override {
107 factory_.Destroy(root_surface_id_); 108 factory_.Destroy(root_surface_id_);
108 SurfaceAggregatorTest::TearDown(); 109 SurfaceAggregatorTest::TearDown();
109 } 110 }
110 111
111 void AggregateAndVerify(test::Pass* expected_passes, 112 void AggregateAndVerify(test::Pass* expected_passes,
112 size_t expected_pass_count, 113 size_t expected_pass_count,
113 SurfaceId* surface_ids, 114 SurfaceId* surface_ids,
114 size_t expected_surface_count) { 115 size_t expected_surface_count) {
115 scoped_ptr<CompositorFrame> aggregated_frame = 116 std::unique_ptr<CompositorFrame> aggregated_frame =
116 aggregator_.Aggregate(root_surface_id_); 117 aggregator_.Aggregate(root_surface_id_);
117 118
118 ASSERT_TRUE(aggregated_frame); 119 ASSERT_TRUE(aggregated_frame);
119 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 120 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
120 121
121 DelegatedFrameData* frame_data = 122 DelegatedFrameData* frame_data =
122 aggregated_frame->delegated_frame_data.get(); 123 aggregated_frame->delegated_frame_data.get();
123 124
124 TestPassesMatchExpectations( 125 TestPassesMatchExpectations(
125 expected_passes, expected_pass_count, &frame_data->render_pass_list); 126 expected_passes, expected_pass_count, &frame_data->render_pass_list);
126 127
127 // Ensure no duplicate pass ids output. 128 // Ensure no duplicate pass ids output.
128 std::set<RenderPassId> used_passes; 129 std::set<RenderPassId> used_passes;
129 for (const auto& pass : frame_data->render_pass_list) { 130 for (const auto& pass : frame_data->render_pass_list) {
130 EXPECT_TRUE(used_passes.insert(pass->id).second); 131 EXPECT_TRUE(used_passes.insert(pass->id).second);
131 } 132 }
132 133
133 EXPECT_EQ(expected_surface_count, 134 EXPECT_EQ(expected_surface_count,
134 aggregator_.previous_contained_surfaces().size()); 135 aggregator_.previous_contained_surfaces().size());
135 for (size_t i = 0; i < expected_surface_count; i++) { 136 for (size_t i = 0; i < expected_surface_count; i++) {
136 EXPECT_TRUE( 137 EXPECT_TRUE(
137 aggregator_.previous_contained_surfaces().find(surface_ids[i]) != 138 aggregator_.previous_contained_surfaces().find(surface_ids[i]) !=
138 aggregator_.previous_contained_surfaces().end()); 139 aggregator_.previous_contained_surfaces().end());
139 } 140 }
140 } 141 }
141 142
142 void SubmitPassListAsFrame(SurfaceId surface_id, RenderPassList* pass_list) { 143 void SubmitPassListAsFrame(SurfaceId surface_id, RenderPassList* pass_list) {
143 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); 144 std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
144 pass_list->swap(frame_data->render_pass_list); 145 pass_list->swap(frame_data->render_pass_list);
145 146
146 scoped_ptr<CompositorFrame> frame(new CompositorFrame); 147 std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
147 frame->delegated_frame_data = std::move(frame_data); 148 frame->delegated_frame_data = std::move(frame_data);
148 149
149 factory_.SubmitCompositorFrame(surface_id, std::move(frame), 150 factory_.SubmitCompositorFrame(surface_id, std::move(frame),
150 SurfaceFactory::DrawCallback()); 151 SurfaceFactory::DrawCallback());
151 } 152 }
152 153
153 void SubmitCompositorFrame(test::Pass* passes, 154 void SubmitCompositorFrame(test::Pass* passes,
154 size_t pass_count, 155 size_t pass_count,
155 SurfaceId surface_id) { 156 SurfaceId surface_id) {
156 RenderPassList pass_list; 157 RenderPassList pass_list;
157 AddPasses(&pass_list, gfx::Rect(SurfaceSize()), passes, pass_count); 158 AddPasses(&pass_list, gfx::Rect(SurfaceSize()), passes, pass_count);
158 SubmitPassListAsFrame(surface_id, &pass_list); 159 SubmitPassListAsFrame(surface_id, &pass_list);
159 } 160 }
160 161
161 void QueuePassAsFrame(scoped_ptr<RenderPass> pass, SurfaceId surface_id) { 162 void QueuePassAsFrame(std::unique_ptr<RenderPass> pass,
162 scoped_ptr<DelegatedFrameData> delegated_frame_data(new DelegatedFrameData); 163 SurfaceId surface_id) {
164 std::unique_ptr<DelegatedFrameData> delegated_frame_data(
165 new DelegatedFrameData);
163 delegated_frame_data->render_pass_list.push_back(std::move(pass)); 166 delegated_frame_data->render_pass_list.push_back(std::move(pass));
164 167
165 scoped_ptr<CompositorFrame> child_frame(new CompositorFrame); 168 std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
166 child_frame->delegated_frame_data = std::move(delegated_frame_data); 169 child_frame->delegated_frame_data = std::move(delegated_frame_data);
167 170
168 factory_.SubmitCompositorFrame(surface_id, std::move(child_frame), 171 factory_.SubmitCompositorFrame(surface_id, std::move(child_frame),
169 SurfaceFactory::DrawCallback()); 172 SurfaceFactory::DrawCallback());
170 } 173 }
171 174
172 protected: 175 protected:
173 SurfaceId root_surface_id_; 176 SurfaceId root_surface_id_;
174 Surface* root_surface_; 177 Surface* root_surface_;
175 SurfaceIdAllocator allocator_; 178 SurfaceIdAllocator allocator_;
(...skipping 28 matching lines...) Expand all
204 test::Pass(embedded_quads, arraysize(embedded_quads))}; 207 test::Pass(embedded_quads, arraysize(embedded_quads))};
205 208
206 SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes), 209 SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
207 embedded_surface_id); 210 embedded_surface_id);
208 211
209 test::Quad quads[] = {test::Quad::SurfaceQuad(embedded_surface_id, .5f)}; 212 test::Quad quads[] = {test::Quad::SurfaceQuad(embedded_surface_id, .5f)};
210 test::Pass passes[] = {test::Pass(quads, arraysize(quads))}; 213 test::Pass passes[] = {test::Pass(quads, arraysize(quads))};
211 214
212 SubmitCompositorFrame(passes, arraysize(passes), root_surface_id_); 215 SubmitCompositorFrame(passes, arraysize(passes), root_surface_id_);
213 216
214 scoped_ptr<CompositorFrame> aggregated_frame = 217 std::unique_ptr<CompositorFrame> aggregated_frame =
215 aggregator_.Aggregate(root_surface_id_); 218 aggregator_.Aggregate(root_surface_id_);
216 219
217 ASSERT_TRUE(aggregated_frame); 220 ASSERT_TRUE(aggregated_frame);
218 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 221 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
219 222
220 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get(); 223 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get();
221 224
222 RenderPassList& render_pass_list(frame_data->render_pass_list); 225 RenderPassList& render_pass_list(frame_data->render_pass_list);
223 ASSERT_EQ(2u, render_pass_list.size()); 226 ASSERT_EQ(2u, render_pass_list.size());
224 SharedQuadStateList& shared_quad_state_list( 227 SharedQuadStateList& shared_quad_state_list(
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 TEST_F(SurfaceAggregatorValidSurfaceTest, CopyRequest) { 291 TEST_F(SurfaceAggregatorValidSurfaceTest, CopyRequest) {
289 SurfaceId embedded_surface_id = allocator_.GenerateId(); 292 SurfaceId embedded_surface_id = allocator_.GenerateId();
290 factory_.Create(embedded_surface_id); 293 factory_.Create(embedded_surface_id);
291 294
292 test::Quad embedded_quads[] = {test::Quad::SolidColorQuad(SK_ColorGREEN)}; 295 test::Quad embedded_quads[] = {test::Quad::SolidColorQuad(SK_ColorGREEN)};
293 test::Pass embedded_passes[] = { 296 test::Pass embedded_passes[] = {
294 test::Pass(embedded_quads, arraysize(embedded_quads))}; 297 test::Pass(embedded_quads, arraysize(embedded_quads))};
295 298
296 SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes), 299 SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
297 embedded_surface_id); 300 embedded_surface_id);
298 scoped_ptr<CopyOutputRequest> copy_request( 301 std::unique_ptr<CopyOutputRequest> copy_request(
299 CopyOutputRequest::CreateEmptyRequest()); 302 CopyOutputRequest::CreateEmptyRequest());
300 CopyOutputRequest* copy_request_ptr = copy_request.get(); 303 CopyOutputRequest* copy_request_ptr = copy_request.get();
301 factory_.RequestCopyOfSurface(embedded_surface_id, std::move(copy_request)); 304 factory_.RequestCopyOfSurface(embedded_surface_id, std::move(copy_request));
302 305
303 test::Quad root_quads[] = {test::Quad::SolidColorQuad(SK_ColorWHITE), 306 test::Quad root_quads[] = {test::Quad::SolidColorQuad(SK_ColorWHITE),
304 test::Quad::SurfaceQuad(embedded_surface_id, 1.f), 307 test::Quad::SurfaceQuad(embedded_surface_id, 1.f),
305 test::Quad::SolidColorQuad(SK_ColorBLACK)}; 308 test::Quad::SolidColorQuad(SK_ColorBLACK)};
306 test::Pass root_passes[] = {test::Pass(root_quads, arraysize(root_quads))}; 309 test::Pass root_passes[] = {test::Pass(root_quads, arraysize(root_quads))};
307 310
308 SubmitCompositorFrame(root_passes, arraysize(root_passes), root_surface_id_); 311 SubmitCompositorFrame(root_passes, arraysize(root_passes), root_surface_id_);
309 312
310 scoped_ptr<CompositorFrame> aggregated_frame = 313 std::unique_ptr<CompositorFrame> aggregated_frame =
311 aggregator_.Aggregate(root_surface_id_); 314 aggregator_.Aggregate(root_surface_id_);
312 315
313 ASSERT_TRUE(aggregated_frame); 316 ASSERT_TRUE(aggregated_frame);
314 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 317 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
315 318
316 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get(); 319 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get();
317 320
318 test::Quad expected_quads[] = { 321 test::Quad expected_quads[] = {
319 test::Quad::SolidColorQuad(SK_ColorWHITE), 322 test::Quad::SolidColorQuad(SK_ColorWHITE),
320 test::Quad::RenderPassQuad(frame_data->render_pass_list[0]->id), 323 test::Quad::RenderPassQuad(frame_data->render_pass_list[0]->id),
(...skipping 25 matching lines...) Expand all
346 TEST_F(SurfaceAggregatorValidSurfaceTest, RootCopyRequest) { 349 TEST_F(SurfaceAggregatorValidSurfaceTest, RootCopyRequest) {
347 SurfaceId embedded_surface_id = allocator_.GenerateId(); 350 SurfaceId embedded_surface_id = allocator_.GenerateId();
348 factory_.Create(embedded_surface_id); 351 factory_.Create(embedded_surface_id);
349 352
350 test::Quad embedded_quads[] = {test::Quad::SolidColorQuad(SK_ColorGREEN)}; 353 test::Quad embedded_quads[] = {test::Quad::SolidColorQuad(SK_ColorGREEN)};
351 test::Pass embedded_passes[] = { 354 test::Pass embedded_passes[] = {
352 test::Pass(embedded_quads, arraysize(embedded_quads))}; 355 test::Pass(embedded_quads, arraysize(embedded_quads))};
353 356
354 SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes), 357 SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
355 embedded_surface_id); 358 embedded_surface_id);
356 scoped_ptr<CopyOutputRequest> copy_request( 359 std::unique_ptr<CopyOutputRequest> copy_request(
357 CopyOutputRequest::CreateEmptyRequest()); 360 CopyOutputRequest::CreateEmptyRequest());
358 CopyOutputRequest* copy_request_ptr = copy_request.get(); 361 CopyOutputRequest* copy_request_ptr = copy_request.get();
359 scoped_ptr<CopyOutputRequest> copy_request2( 362 std::unique_ptr<CopyOutputRequest> copy_request2(
360 CopyOutputRequest::CreateEmptyRequest()); 363 CopyOutputRequest::CreateEmptyRequest());
361 CopyOutputRequest* copy_request2_ptr = copy_request2.get(); 364 CopyOutputRequest* copy_request2_ptr = copy_request2.get();
362 365
363 test::Quad root_quads[] = {test::Quad::SolidColorQuad(SK_ColorWHITE), 366 test::Quad root_quads[] = {test::Quad::SolidColorQuad(SK_ColorWHITE),
364 test::Quad::SurfaceQuad(embedded_surface_id, 1.f), 367 test::Quad::SurfaceQuad(embedded_surface_id, 1.f),
365 test::Quad::SolidColorQuad(SK_ColorBLACK)}; 368 test::Quad::SolidColorQuad(SK_ColorBLACK)};
366 test::Quad root_quads2[] = {test::Quad::SolidColorQuad(SK_ColorRED)}; 369 test::Quad root_quads2[] = {test::Quad::SolidColorQuad(SK_ColorRED)};
367 test::Pass root_passes[] = { 370 test::Pass root_passes[] = {
368 test::Pass(root_quads, arraysize(root_quads), RenderPassId(1, 1)), 371 test::Pass(root_quads, arraysize(root_quads), RenderPassId(1, 1)),
369 test::Pass(root_quads2, arraysize(root_quads2), RenderPassId(1, 2))}; 372 test::Pass(root_quads2, arraysize(root_quads2), RenderPassId(1, 2))};
370 { 373 {
371 RenderPassList pass_list; 374 RenderPassList pass_list;
372 AddPasses(&pass_list, 375 AddPasses(&pass_list,
373 gfx::Rect(SurfaceSize()), 376 gfx::Rect(SurfaceSize()),
374 root_passes, 377 root_passes,
375 arraysize(root_passes)); 378 arraysize(root_passes));
376 pass_list[0]->copy_requests.push_back(std::move(copy_request)); 379 pass_list[0]->copy_requests.push_back(std::move(copy_request));
377 pass_list[1]->copy_requests.push_back(std::move(copy_request2)); 380 pass_list[1]->copy_requests.push_back(std::move(copy_request2));
378 381
379 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); 382 std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
380 pass_list.swap(frame_data->render_pass_list); 383 pass_list.swap(frame_data->render_pass_list);
381 384
382 scoped_ptr<CompositorFrame> frame(new CompositorFrame); 385 std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
383 frame->delegated_frame_data = std::move(frame_data); 386 frame->delegated_frame_data = std::move(frame_data);
384 387
385 factory_.SubmitCompositorFrame(root_surface_id_, std::move(frame), 388 factory_.SubmitCompositorFrame(root_surface_id_, std::move(frame),
386 SurfaceFactory::DrawCallback()); 389 SurfaceFactory::DrawCallback());
387 } 390 }
388 391
389 scoped_ptr<CompositorFrame> aggregated_frame = 392 std::unique_ptr<CompositorFrame> aggregated_frame =
390 aggregator_.Aggregate(root_surface_id_); 393 aggregator_.Aggregate(root_surface_id_);
391 394
392 ASSERT_TRUE(aggregated_frame); 395 ASSERT_TRUE(aggregated_frame);
393 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 396 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
394 397
395 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get(); 398 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get();
396 399
397 test::Quad expected_quads[] = {test::Quad::SolidColorQuad(SK_ColorWHITE), 400 test::Quad expected_quads[] = {test::Quad::SolidColorQuad(SK_ColorWHITE),
398 test::Quad::SolidColorQuad(SK_ColorGREEN), 401 test::Quad::SolidColorQuad(SK_ColorGREEN),
399 test::Quad::SolidColorQuad(SK_ColorBLACK)}; 402 test::Quad::SolidColorQuad(SK_ColorBLACK)};
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 SurfaceId embedded_surface_id = allocator_.GenerateId(); 439 SurfaceId embedded_surface_id = allocator_.GenerateId();
437 SurfaceId nonexistent_surface_id = allocator_.GenerateId(); 440 SurfaceId nonexistent_surface_id = allocator_.GenerateId();
438 factory_.Create(embedded_surface_id); 441 factory_.Create(embedded_surface_id);
439 442
440 test::Quad embedded_quads[] = {test::Quad::SolidColorQuad(SK_ColorGREEN)}; 443 test::Quad embedded_quads[] = {test::Quad::SolidColorQuad(SK_ColorGREEN)};
441 test::Pass embedded_passes[] = { 444 test::Pass embedded_passes[] = {
442 test::Pass(embedded_quads, arraysize(embedded_quads))}; 445 test::Pass(embedded_quads, arraysize(embedded_quads))};
443 446
444 SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes), 447 SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
445 embedded_surface_id); 448 embedded_surface_id);
446 scoped_ptr<CopyOutputRequest> copy_request( 449 std::unique_ptr<CopyOutputRequest> copy_request(
447 CopyOutputRequest::CreateEmptyRequest()); 450 CopyOutputRequest::CreateEmptyRequest());
448 CopyOutputRequest* copy_request_ptr = copy_request.get(); 451 CopyOutputRequest* copy_request_ptr = copy_request.get();
449 factory_.RequestCopyOfSurface(embedded_surface_id, std::move(copy_request)); 452 factory_.RequestCopyOfSurface(embedded_surface_id, std::move(copy_request));
450 453
451 SurfaceId parent_surface_id = allocator_.GenerateId(); 454 SurfaceId parent_surface_id = allocator_.GenerateId();
452 factory_.Create(parent_surface_id); 455 factory_.Create(parent_surface_id);
453 456
454 test::Quad parent_quads[] = { 457 test::Quad parent_quads[] = {
455 test::Quad::SolidColorQuad(SK_ColorWHITE), 458 test::Quad::SolidColorQuad(SK_ColorWHITE),
456 test::Quad::SurfaceQuad(embedded_surface_id, 1.f), 459 test::Quad::SurfaceQuad(embedded_surface_id, 1.f),
457 test::Quad::SolidColorQuad(SK_ColorBLACK)}; 460 test::Quad::SolidColorQuad(SK_ColorBLACK)};
458 test::Pass parent_passes[] = { 461 test::Pass parent_passes[] = {
459 test::Pass(parent_quads, arraysize(parent_quads))}; 462 test::Pass(parent_quads, arraysize(parent_quads))};
460 463
461 { 464 {
462 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); 465 std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
463 AddPasses(&frame_data->render_pass_list, gfx::Rect(SurfaceSize()), 466 AddPasses(&frame_data->render_pass_list, gfx::Rect(SurfaceSize()),
464 parent_passes, arraysize(parent_passes)); 467 parent_passes, arraysize(parent_passes));
465 468
466 scoped_ptr<CompositorFrame> frame(new CompositorFrame); 469 std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
467 frame->delegated_frame_data = std::move(frame_data); 470 frame->delegated_frame_data = std::move(frame_data);
468 frame->metadata.referenced_surfaces.push_back(embedded_surface_id); 471 frame->metadata.referenced_surfaces.push_back(embedded_surface_id);
469 472
470 factory_.SubmitCompositorFrame(parent_surface_id, std::move(frame), 473 factory_.SubmitCompositorFrame(parent_surface_id, std::move(frame),
471 SurfaceFactory::DrawCallback()); 474 SurfaceFactory::DrawCallback());
472 } 475 }
473 476
474 test::Quad root_quads[] = {test::Quad::SolidColorQuad(SK_ColorWHITE), 477 test::Quad root_quads[] = {test::Quad::SolidColorQuad(SK_ColorWHITE),
475 test::Quad::SolidColorQuad(SK_ColorBLACK)}; 478 test::Quad::SolidColorQuad(SK_ColorBLACK)};
476 test::Pass root_passes[] = {test::Pass(root_quads, arraysize(root_quads))}; 479 test::Pass root_passes[] = {test::Pass(root_quads, arraysize(root_quads))};
477 480
478 { 481 {
479 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); 482 std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
480 AddPasses(&frame_data->render_pass_list, gfx::Rect(SurfaceSize()), 483 AddPasses(&frame_data->render_pass_list, gfx::Rect(SurfaceSize()),
481 root_passes, arraysize(root_passes)); 484 root_passes, arraysize(root_passes));
482 485
483 scoped_ptr<CompositorFrame> frame(new CompositorFrame); 486 std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
484 frame->delegated_frame_data = std::move(frame_data); 487 frame->delegated_frame_data = std::move(frame_data);
485 frame->metadata.referenced_surfaces.push_back(parent_surface_id); 488 frame->metadata.referenced_surfaces.push_back(parent_surface_id);
486 // Reference to Surface ID of a Surface that doesn't exist should be 489 // Reference to Surface ID of a Surface that doesn't exist should be
487 // included in previous_contained_surfaces, but otherwise ignored. 490 // included in previous_contained_surfaces, but otherwise ignored.
488 frame->metadata.referenced_surfaces.push_back(nonexistent_surface_id); 491 frame->metadata.referenced_surfaces.push_back(nonexistent_surface_id);
489 492
490 factory_.SubmitCompositorFrame(root_surface_id_, std::move(frame), 493 factory_.SubmitCompositorFrame(root_surface_id_, std::move(frame),
491 SurfaceFactory::DrawCallback()); 494 SurfaceFactory::DrawCallback());
492 } 495 }
493 496
494 scoped_ptr<CompositorFrame> aggregated_frame = 497 std::unique_ptr<CompositorFrame> aggregated_frame =
495 aggregator_.Aggregate(root_surface_id_); 498 aggregator_.Aggregate(root_surface_id_);
496 499
497 ASSERT_TRUE(aggregated_frame); 500 ASSERT_TRUE(aggregated_frame);
498 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 501 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
499 502
500 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get(); 503 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get();
501 504
502 // First pass should come from surface that had a copy request but was not 505 // First pass should come from surface that had a copy request but was not
503 // referenced directly. The second pass comes from the root surface. 506 // referenced directly. The second pass comes from the root surface.
504 // parent_quad should be ignored because it is neither referenced through a 507 // parent_quad should be ignored because it is neither referenced through a
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 {test::Quad::SurfaceQuad(embedded_surface_id, 1.f), 555 {test::Quad::SurfaceQuad(embedded_surface_id, 1.f),
553 test::Quad::RenderPassQuad(pass_ids[0])}, 556 test::Quad::RenderPassQuad(pass_ids[0])},
554 {test::Quad::SolidColorQuad(7), test::Quad::RenderPassQuad(pass_ids[1])}}; 557 {test::Quad::SolidColorQuad(7), test::Quad::RenderPassQuad(pass_ids[1])}};
555 test::Pass root_passes[] = { 558 test::Pass root_passes[] = {
556 test::Pass(root_quads[0], arraysize(root_quads[0]), pass_ids[0]), 559 test::Pass(root_quads[0], arraysize(root_quads[0]), pass_ids[0]),
557 test::Pass(root_quads[1], arraysize(root_quads[1]), pass_ids[1]), 560 test::Pass(root_quads[1], arraysize(root_quads[1]), pass_ids[1]),
558 test::Pass(root_quads[2], arraysize(root_quads[2]), pass_ids[2])}; 561 test::Pass(root_quads[2], arraysize(root_quads[2]), pass_ids[2])};
559 562
560 SubmitCompositorFrame(root_passes, arraysize(root_passes), root_surface_id_); 563 SubmitCompositorFrame(root_passes, arraysize(root_passes), root_surface_id_);
561 564
562 scoped_ptr<CompositorFrame> aggregated_frame = 565 std::unique_ptr<CompositorFrame> aggregated_frame =
563 aggregator_.Aggregate(root_surface_id_); 566 aggregator_.Aggregate(root_surface_id_);
564 567
565 ASSERT_TRUE(aggregated_frame); 568 ASSERT_TRUE(aggregated_frame);
566 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 569 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
567 570
568 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get(); 571 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get();
569 572
570 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 573 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
571 574
572 ASSERT_EQ(5u, aggregated_pass_list.size()); 575 ASSERT_EQ(5u, aggregated_pass_list.size());
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 test::Quad parent_quad[][1] = { 791 test::Quad parent_quad[][1] = {
789 {test::Quad::SurfaceQuad(child_surface_id, 1.f)}, 792 {test::Quad::SurfaceQuad(child_surface_id, 1.f)},
790 {test::Quad::RenderPassQuad(parent_pass_id[0])}}; 793 {test::Quad::RenderPassQuad(parent_pass_id[0])}};
791 test::Pass parent_passes[] = { 794 test::Pass parent_passes[] = {
792 test::Pass(parent_quad[0], arraysize(parent_quad[0]), parent_pass_id[0]), 795 test::Pass(parent_quad[0], arraysize(parent_quad[0]), parent_pass_id[0]),
793 test::Pass(parent_quad[1], arraysize(parent_quad[1]), parent_pass_id[1])}; 796 test::Pass(parent_quad[1], arraysize(parent_quad[1]), parent_pass_id[1])};
794 797
795 SubmitCompositorFrame(parent_passes, arraysize(parent_passes), 798 SubmitCompositorFrame(parent_passes, arraysize(parent_passes),
796 root_surface_id_); 799 root_surface_id_);
797 800
798 scoped_ptr<CompositorFrame> aggregated_frame = 801 std::unique_ptr<CompositorFrame> aggregated_frame =
799 aggregator_.Aggregate(root_surface_id_); 802 aggregator_.Aggregate(root_surface_id_);
800 803
801 ASSERT_TRUE(aggregated_frame); 804 ASSERT_TRUE(aggregated_frame);
802 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 805 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
803 806
804 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get(); 807 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get();
805 808
806 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 809 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
807 810
808 ASSERT_EQ(3u, aggregated_pass_list.size()); 811 ASSERT_EQ(3u, aggregated_pass_list.size());
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 SkXfermode::kDst_Mode, // 2 891 SkXfermode::kDst_Mode, // 2
889 SkXfermode::kSrcOver_Mode, // 3 892 SkXfermode::kSrcOver_Mode, // 3
890 SkXfermode::kDstOver_Mode, // 4 893 SkXfermode::kDstOver_Mode, // 4
891 SkXfermode::kSrcIn_Mode, // 5 894 SkXfermode::kSrcIn_Mode, // 5
892 SkXfermode::kDstIn_Mode, // 6 895 SkXfermode::kDstIn_Mode, // 6
893 }; 896 };
894 897
895 RenderPassId pass_id(1, 1); 898 RenderPassId pass_id(1, 1);
896 SurfaceId grandchild_surface_id = allocator_.GenerateId(); 899 SurfaceId grandchild_surface_id = allocator_.GenerateId();
897 factory_.Create(grandchild_surface_id); 900 factory_.Create(grandchild_surface_id);
898 scoped_ptr<RenderPass> grandchild_pass = RenderPass::Create(); 901 std::unique_ptr<RenderPass> grandchild_pass = RenderPass::Create();
899 gfx::Rect output_rect(SurfaceSize()); 902 gfx::Rect output_rect(SurfaceSize());
900 gfx::Rect damage_rect(SurfaceSize()); 903 gfx::Rect damage_rect(SurfaceSize());
901 gfx::Transform transform_to_root_target; 904 gfx::Transform transform_to_root_target;
902 grandchild_pass->SetNew( 905 grandchild_pass->SetNew(
903 pass_id, output_rect, damage_rect, transform_to_root_target); 906 pass_id, output_rect, damage_rect, transform_to_root_target);
904 AddSolidColorQuadWithBlendMode( 907 AddSolidColorQuadWithBlendMode(
905 SurfaceSize(), grandchild_pass.get(), blend_modes[2]); 908 SurfaceSize(), grandchild_pass.get(), blend_modes[2]);
906 QueuePassAsFrame(std::move(grandchild_pass), grandchild_surface_id); 909 QueuePassAsFrame(std::move(grandchild_pass), grandchild_surface_id);
907 910
908 SurfaceId child_one_surface_id = allocator_.GenerateId(); 911 SurfaceId child_one_surface_id = allocator_.GenerateId();
909 factory_.Create(child_one_surface_id); 912 factory_.Create(child_one_surface_id);
910 913
911 scoped_ptr<RenderPass> child_one_pass = RenderPass::Create(); 914 std::unique_ptr<RenderPass> child_one_pass = RenderPass::Create();
912 child_one_pass->SetNew( 915 child_one_pass->SetNew(
913 pass_id, output_rect, damage_rect, transform_to_root_target); 916 pass_id, output_rect, damage_rect, transform_to_root_target);
914 AddSolidColorQuadWithBlendMode( 917 AddSolidColorQuadWithBlendMode(
915 SurfaceSize(), child_one_pass.get(), blend_modes[1]); 918 SurfaceSize(), child_one_pass.get(), blend_modes[1]);
916 SurfaceDrawQuad* grandchild_surface_quad = 919 SurfaceDrawQuad* grandchild_surface_quad =
917 child_one_pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); 920 child_one_pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
918 grandchild_surface_quad->SetNew(child_one_pass->shared_quad_state_list.back(), 921 grandchild_surface_quad->SetNew(child_one_pass->shared_quad_state_list.back(),
919 gfx::Rect(SurfaceSize()), 922 gfx::Rect(SurfaceSize()),
920 gfx::Rect(SurfaceSize()), 923 gfx::Rect(SurfaceSize()),
921 grandchild_surface_id); 924 grandchild_surface_id);
922 AddSolidColorQuadWithBlendMode( 925 AddSolidColorQuadWithBlendMode(
923 SurfaceSize(), child_one_pass.get(), blend_modes[3]); 926 SurfaceSize(), child_one_pass.get(), blend_modes[3]);
924 QueuePassAsFrame(std::move(child_one_pass), child_one_surface_id); 927 QueuePassAsFrame(std::move(child_one_pass), child_one_surface_id);
925 928
926 SurfaceId child_two_surface_id = allocator_.GenerateId(); 929 SurfaceId child_two_surface_id = allocator_.GenerateId();
927 factory_.Create(child_two_surface_id); 930 factory_.Create(child_two_surface_id);
928 931
929 scoped_ptr<RenderPass> child_two_pass = RenderPass::Create(); 932 std::unique_ptr<RenderPass> child_two_pass = RenderPass::Create();
930 child_two_pass->SetNew( 933 child_two_pass->SetNew(
931 pass_id, output_rect, damage_rect, transform_to_root_target); 934 pass_id, output_rect, damage_rect, transform_to_root_target);
932 AddSolidColorQuadWithBlendMode( 935 AddSolidColorQuadWithBlendMode(
933 SurfaceSize(), child_two_pass.get(), blend_modes[5]); 936 SurfaceSize(), child_two_pass.get(), blend_modes[5]);
934 QueuePassAsFrame(std::move(child_two_pass), child_two_surface_id); 937 QueuePassAsFrame(std::move(child_two_pass), child_two_surface_id);
935 938
936 scoped_ptr<RenderPass> root_pass = RenderPass::Create(); 939 std::unique_ptr<RenderPass> root_pass = RenderPass::Create();
937 root_pass->SetNew( 940 root_pass->SetNew(
938 pass_id, output_rect, damage_rect, transform_to_root_target); 941 pass_id, output_rect, damage_rect, transform_to_root_target);
939 942
940 AddSolidColorQuadWithBlendMode( 943 AddSolidColorQuadWithBlendMode(
941 SurfaceSize(), root_pass.get(), blend_modes[0]); 944 SurfaceSize(), root_pass.get(), blend_modes[0]);
942 SurfaceDrawQuad* child_one_surface_quad = 945 SurfaceDrawQuad* child_one_surface_quad =
943 root_pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); 946 root_pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
944 child_one_surface_quad->SetNew(root_pass->shared_quad_state_list.back(), 947 child_one_surface_quad->SetNew(root_pass->shared_quad_state_list.back(),
945 gfx::Rect(SurfaceSize()), 948 gfx::Rect(SurfaceSize()),
946 gfx::Rect(SurfaceSize()), 949 gfx::Rect(SurfaceSize()),
947 child_one_surface_id); 950 child_one_surface_id);
948 AddSolidColorQuadWithBlendMode( 951 AddSolidColorQuadWithBlendMode(
949 SurfaceSize(), root_pass.get(), blend_modes[4]); 952 SurfaceSize(), root_pass.get(), blend_modes[4]);
950 SurfaceDrawQuad* child_two_surface_quad = 953 SurfaceDrawQuad* child_two_surface_quad =
951 root_pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); 954 root_pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
952 child_two_surface_quad->SetNew(root_pass->shared_quad_state_list.back(), 955 child_two_surface_quad->SetNew(root_pass->shared_quad_state_list.back(),
953 gfx::Rect(SurfaceSize()), 956 gfx::Rect(SurfaceSize()),
954 gfx::Rect(SurfaceSize()), 957 gfx::Rect(SurfaceSize()),
955 child_two_surface_id); 958 child_two_surface_id);
956 AddSolidColorQuadWithBlendMode( 959 AddSolidColorQuadWithBlendMode(
957 SurfaceSize(), root_pass.get(), blend_modes[6]); 960 SurfaceSize(), root_pass.get(), blend_modes[6]);
958 961
959 QueuePassAsFrame(std::move(root_pass), root_surface_id_); 962 QueuePassAsFrame(std::move(root_pass), root_surface_id_);
960 963
961 scoped_ptr<CompositorFrame> aggregated_frame = 964 std::unique_ptr<CompositorFrame> aggregated_frame =
962 aggregator_.Aggregate(root_surface_id_); 965 aggregator_.Aggregate(root_surface_id_);
963 966
964 ASSERT_TRUE(aggregated_frame); 967 ASSERT_TRUE(aggregated_frame);
965 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 968 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
966 969
967 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get(); 970 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get();
968 971
969 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 972 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
970 973
971 ASSERT_EQ(1u, aggregated_pass_list.size()); 974 ASSERT_EQ(1u, aggregated_pass_list.size());
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 child_nonroot_pass->shared_quad_state_list.front(); 1031 child_nonroot_pass->shared_quad_state_list.front();
1029 child_nonroot_pass_sqs->quad_to_target_transform.Translate(5, 0); 1032 child_nonroot_pass_sqs->quad_to_target_transform.Translate(5, 0);
1030 1033
1031 RenderPass* child_root_pass = child_pass_list[1].get(); 1034 RenderPass* child_root_pass = child_pass_list[1].get();
1032 SharedQuadState* child_root_pass_sqs = 1035 SharedQuadState* child_root_pass_sqs =
1033 child_root_pass->shared_quad_state_list.front(); 1036 child_root_pass->shared_quad_state_list.front();
1034 child_root_pass_sqs->quad_to_target_transform.Translate(8, 0); 1037 child_root_pass_sqs->quad_to_target_transform.Translate(8, 0);
1035 child_root_pass_sqs->is_clipped = true; 1038 child_root_pass_sqs->is_clipped = true;
1036 child_root_pass_sqs->clip_rect = gfx::Rect(0, 0, 5, 5); 1039 child_root_pass_sqs->clip_rect = gfx::Rect(0, 0, 5, 5);
1037 1040
1038 scoped_ptr<DelegatedFrameData> child_frame_data(new DelegatedFrameData); 1041 std::unique_ptr<DelegatedFrameData> child_frame_data(
1042 new DelegatedFrameData);
1039 child_pass_list.swap(child_frame_data->render_pass_list); 1043 child_pass_list.swap(child_frame_data->render_pass_list);
1040 1044
1041 scoped_ptr<CompositorFrame> child_frame(new CompositorFrame); 1045 std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
1042 child_frame->delegated_frame_data = std::move(child_frame_data); 1046 child_frame->delegated_frame_data = std::move(child_frame_data);
1043 1047
1044 factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame), 1048 factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
1045 SurfaceFactory::DrawCallback()); 1049 SurfaceFactory::DrawCallback());
1046 } 1050 }
1047 1051
1048 // Middle child surface. 1052 // Middle child surface.
1049 SurfaceId middle_surface_id = allocator_.GenerateId(); 1053 SurfaceId middle_surface_id = allocator_.GenerateId();
1050 factory_.Create(middle_surface_id); 1054 factory_.Create(middle_surface_id);
1051 { 1055 {
1052 test::Quad middle_quads[] = { 1056 test::Quad middle_quads[] = {
1053 test::Quad::SurfaceQuad(child_surface_id, 1.f)}; 1057 test::Quad::SurfaceQuad(child_surface_id, 1.f)};
1054 test::Pass middle_passes[] = { 1058 test::Pass middle_passes[] = {
1055 test::Pass(middle_quads, arraysize(middle_quads)), 1059 test::Pass(middle_quads, arraysize(middle_quads)),
1056 }; 1060 };
1057 1061
1058 RenderPassList middle_pass_list; 1062 RenderPassList middle_pass_list;
1059 AddPasses(&middle_pass_list, gfx::Rect(SurfaceSize()), middle_passes, 1063 AddPasses(&middle_pass_list, gfx::Rect(SurfaceSize()), middle_passes,
1060 arraysize(middle_passes)); 1064 arraysize(middle_passes));
1061 1065
1062 RenderPass* middle_root_pass = middle_pass_list[0].get(); 1066 RenderPass* middle_root_pass = middle_pass_list[0].get();
1063 middle_root_pass->quad_list.ElementAt(0)->visible_rect = 1067 middle_root_pass->quad_list.ElementAt(0)->visible_rect =
1064 gfx::Rect(0, 1, 100, 7); 1068 gfx::Rect(0, 1, 100, 7);
1065 SharedQuadState* middle_root_pass_sqs = 1069 SharedQuadState* middle_root_pass_sqs =
1066 middle_root_pass->shared_quad_state_list.front(); 1070 middle_root_pass->shared_quad_state_list.front();
1067 middle_root_pass_sqs->quad_to_target_transform.Scale(2, 3); 1071 middle_root_pass_sqs->quad_to_target_transform.Scale(2, 3);
1068 1072
1069 scoped_ptr<DelegatedFrameData> middle_frame_data(new DelegatedFrameData); 1073 std::unique_ptr<DelegatedFrameData> middle_frame_data(
1074 new DelegatedFrameData);
1070 middle_pass_list.swap(middle_frame_data->render_pass_list); 1075 middle_pass_list.swap(middle_frame_data->render_pass_list);
1071 1076
1072 scoped_ptr<CompositorFrame> middle_frame(new CompositorFrame); 1077 std::unique_ptr<CompositorFrame> middle_frame(new CompositorFrame);
1073 middle_frame->delegated_frame_data = std::move(middle_frame_data); 1078 middle_frame->delegated_frame_data = std::move(middle_frame_data);
1074 1079
1075 factory_.SubmitCompositorFrame(middle_surface_id, std::move(middle_frame), 1080 factory_.SubmitCompositorFrame(middle_surface_id, std::move(middle_frame),
1076 SurfaceFactory::DrawCallback()); 1081 SurfaceFactory::DrawCallback());
1077 } 1082 }
1078 1083
1079 // Root surface. 1084 // Root surface.
1080 test::Quad secondary_quads[] = { 1085 test::Quad secondary_quads[] = {
1081 test::Quad::SolidColorQuad(1), 1086 test::Quad::SolidColorQuad(1),
1082 test::Quad::SurfaceQuad(middle_surface_id, 1.f)}; 1087 test::Quad::SurfaceQuad(middle_surface_id, 1.f)};
(...skipping 12 matching lines...) Expand all
1095 ->shared_quad_state_list.front() 1100 ->shared_quad_state_list.front()
1096 ->quad_to_target_transform.Translate(0, 7); 1101 ->quad_to_target_transform.Translate(0, 7);
1097 root_pass_list[0] 1102 root_pass_list[0]
1098 ->shared_quad_state_list.ElementAt(1) 1103 ->shared_quad_state_list.ElementAt(1)
1099 ->quad_to_target_transform.Translate(0, 10); 1104 ->quad_to_target_transform.Translate(0, 10);
1100 root_pass_list[0]->quad_list.ElementAt(1)->visible_rect = 1105 root_pass_list[0]->quad_list.ElementAt(1)->visible_rect =
1101 gfx::Rect(0, 0, 8, 100); 1106 gfx::Rect(0, 0, 8, 100);
1102 1107
1103 root_pass_list[0]->transform_to_root_target.Translate(10, 5); 1108 root_pass_list[0]->transform_to_root_target.Translate(10, 5);
1104 1109
1105 scoped_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData); 1110 std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
1106 root_pass_list.swap(root_frame_data->render_pass_list); 1111 root_pass_list.swap(root_frame_data->render_pass_list);
1107 1112
1108 scoped_ptr<CompositorFrame> root_frame(new CompositorFrame); 1113 std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
1109 root_frame->delegated_frame_data = std::move(root_frame_data); 1114 root_frame->delegated_frame_data = std::move(root_frame_data);
1110 1115
1111 factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame), 1116 factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame),
1112 SurfaceFactory::DrawCallback()); 1117 SurfaceFactory::DrawCallback());
1113 1118
1114 scoped_ptr<CompositorFrame> aggregated_frame = 1119 std::unique_ptr<CompositorFrame> aggregated_frame =
1115 aggregator_.Aggregate(root_surface_id_); 1120 aggregator_.Aggregate(root_surface_id_);
1116 1121
1117 ASSERT_TRUE(aggregated_frame); 1122 ASSERT_TRUE(aggregated_frame);
1118 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 1123 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
1119 1124
1120 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get(); 1125 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get();
1121 1126
1122 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 1127 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
1123 1128
1124 ASSERT_EQ(3u, aggregated_pass_list.size()); 1129 ASSERT_EQ(3u, aggregated_pass_list.size());
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 AddPasses(&child_pass_list, 1207 AddPasses(&child_pass_list,
1203 gfx::Rect(SurfaceSize()), 1208 gfx::Rect(SurfaceSize()),
1204 child_passes, 1209 child_passes,
1205 arraysize(child_passes)); 1210 arraysize(child_passes));
1206 1211
1207 RenderPass* child_root_pass = child_pass_list[0].get(); 1212 RenderPass* child_root_pass = child_pass_list[0].get();
1208 SharedQuadState* child_root_pass_sqs = 1213 SharedQuadState* child_root_pass_sqs =
1209 child_root_pass->shared_quad_state_list.front(); 1214 child_root_pass->shared_quad_state_list.front();
1210 child_root_pass_sqs->quad_to_target_transform.Translate(8, 0); 1215 child_root_pass_sqs->quad_to_target_transform.Translate(8, 0);
1211 1216
1212 scoped_ptr<DelegatedFrameData> child_frame_data(new DelegatedFrameData); 1217 std::unique_ptr<DelegatedFrameData> child_frame_data(new DelegatedFrameData);
1213 child_pass_list.swap(child_frame_data->render_pass_list); 1218 child_pass_list.swap(child_frame_data->render_pass_list);
1214 1219
1215 scoped_ptr<CompositorFrame> child_frame(new CompositorFrame); 1220 std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
1216 child_frame->delegated_frame_data = std::move(child_frame_data); 1221 child_frame->delegated_frame_data = std::move(child_frame_data);
1217 1222
1218 SurfaceId child_surface_id = allocator_.GenerateId(); 1223 SurfaceId child_surface_id = allocator_.GenerateId();
1219 factory_.Create(child_surface_id); 1224 factory_.Create(child_surface_id);
1220 factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame), 1225 factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
1221 SurfaceFactory::DrawCallback()); 1226 SurfaceFactory::DrawCallback());
1222 1227
1223 test::Quad parent_surface_quads[] = { 1228 test::Quad parent_surface_quads[] = {
1224 test::Quad::SurfaceQuad(child_surface_id, 1.f)}; 1229 test::Quad::SurfaceQuad(child_surface_id, 1.f)};
1225 test::Pass parent_surface_passes[] = { 1230 test::Pass parent_surface_passes[] = {
1226 test::Pass(parent_surface_quads, arraysize(parent_surface_quads), 1231 test::Pass(parent_surface_quads, arraysize(parent_surface_quads),
1227 RenderPassId(1, 1))}; 1232 RenderPassId(1, 1))};
1228 1233
1229 RenderPassList parent_surface_pass_list; 1234 RenderPassList parent_surface_pass_list;
1230 AddPasses(&parent_surface_pass_list, 1235 AddPasses(&parent_surface_pass_list,
1231 gfx::Rect(SurfaceSize()), 1236 gfx::Rect(SurfaceSize()),
1232 parent_surface_passes, 1237 parent_surface_passes,
1233 arraysize(parent_surface_passes)); 1238 arraysize(parent_surface_passes));
1234 1239
1235 // Parent surface is only used to test if the transform is applied correctly 1240 // Parent surface is only used to test if the transform is applied correctly
1236 // to the child surface's damage. 1241 // to the child surface's damage.
1237 scoped_ptr<DelegatedFrameData> parent_surface_frame_data( 1242 std::unique_ptr<DelegatedFrameData> parent_surface_frame_data(
1238 new DelegatedFrameData); 1243 new DelegatedFrameData);
1239 parent_surface_pass_list.swap(parent_surface_frame_data->render_pass_list); 1244 parent_surface_pass_list.swap(parent_surface_frame_data->render_pass_list);
1240 1245
1241 scoped_ptr<CompositorFrame> parent_surface_frame(new CompositorFrame); 1246 std::unique_ptr<CompositorFrame> parent_surface_frame(new CompositorFrame);
1242 parent_surface_frame->delegated_frame_data = 1247 parent_surface_frame->delegated_frame_data =
1243 std::move(parent_surface_frame_data); 1248 std::move(parent_surface_frame_data);
1244 1249
1245 SurfaceId parent_surface_id = allocator_.GenerateId(); 1250 SurfaceId parent_surface_id = allocator_.GenerateId();
1246 factory_.Create(parent_surface_id); 1251 factory_.Create(parent_surface_id);
1247 factory_.SubmitCompositorFrame(parent_surface_id, 1252 factory_.SubmitCompositorFrame(parent_surface_id,
1248 std::move(parent_surface_frame), 1253 std::move(parent_surface_frame),
1249 SurfaceFactory::DrawCallback()); 1254 SurfaceFactory::DrawCallback());
1250 1255
1251 test::Quad root_surface_quads[] = { 1256 test::Quad root_surface_quads[] = {
(...skipping 12 matching lines...) Expand all
1264 gfx::Rect(SurfaceSize()), 1269 gfx::Rect(SurfaceSize()),
1265 root_passes, 1270 root_passes,
1266 arraysize(root_passes)); 1271 arraysize(root_passes));
1267 1272
1268 root_pass_list[0] 1273 root_pass_list[0]
1269 ->shared_quad_state_list.front() 1274 ->shared_quad_state_list.front()
1270 ->quad_to_target_transform.Translate(0, 10); 1275 ->quad_to_target_transform.Translate(0, 10);
1271 root_pass_list[0]->damage_rect = gfx::Rect(5, 5, 10, 10); 1276 root_pass_list[0]->damage_rect = gfx::Rect(5, 5, 10, 10);
1272 root_pass_list[1]->damage_rect = gfx::Rect(5, 5, 100, 100); 1277 root_pass_list[1]->damage_rect = gfx::Rect(5, 5, 100, 100);
1273 1278
1274 scoped_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData); 1279 std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
1275 root_pass_list.swap(root_frame_data->render_pass_list); 1280 root_pass_list.swap(root_frame_data->render_pass_list);
1276 1281
1277 scoped_ptr<CompositorFrame> root_frame(new CompositorFrame); 1282 std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
1278 root_frame->delegated_frame_data = std::move(root_frame_data); 1283 root_frame->delegated_frame_data = std::move(root_frame_data);
1279 1284
1280 factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame), 1285 factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame),
1281 SurfaceFactory::DrawCallback()); 1286 SurfaceFactory::DrawCallback());
1282 1287
1283 scoped_ptr<CompositorFrame> aggregated_frame = 1288 std::unique_ptr<CompositorFrame> aggregated_frame =
1284 aggregator_.Aggregate(root_surface_id_); 1289 aggregator_.Aggregate(root_surface_id_);
1285 1290
1286 ASSERT_TRUE(aggregated_frame); 1291 ASSERT_TRUE(aggregated_frame);
1287 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 1292 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
1288 1293
1289 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get(); 1294 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get();
1290 1295
1291 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 1296 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
1292 1297
1293 ASSERT_EQ(2u, aggregated_pass_list.size()); 1298 ASSERT_EQ(2u, aggregated_pass_list.size());
1294 1299
1295 // Damage rect for first aggregation should contain entire root surface. 1300 // Damage rect for first aggregation should contain entire root surface.
1296 EXPECT_TRUE( 1301 EXPECT_TRUE(
1297 aggregated_pass_list[1]->damage_rect.Contains(gfx::Rect(SurfaceSize()))); 1302 aggregated_pass_list[1]->damage_rect.Contains(gfx::Rect(SurfaceSize())));
1298 1303
1299 { 1304 {
1300 AddPasses(&child_pass_list, 1305 AddPasses(&child_pass_list,
1301 gfx::Rect(SurfaceSize()), 1306 gfx::Rect(SurfaceSize()),
1302 child_passes, 1307 child_passes,
1303 arraysize(child_passes)); 1308 arraysize(child_passes));
1304 1309
1305 RenderPass* child_root_pass = child_pass_list[0].get(); 1310 RenderPass* child_root_pass = child_pass_list[0].get();
1306 SharedQuadState* child_root_pass_sqs = 1311 SharedQuadState* child_root_pass_sqs =
1307 child_root_pass->shared_quad_state_list.front(); 1312 child_root_pass->shared_quad_state_list.front();
1308 child_root_pass_sqs->quad_to_target_transform.Translate(8, 0); 1313 child_root_pass_sqs->quad_to_target_transform.Translate(8, 0);
1309 child_root_pass->damage_rect = gfx::Rect(10, 10, 10, 10); 1314 child_root_pass->damage_rect = gfx::Rect(10, 10, 10, 10);
1310 1315
1311 scoped_ptr<DelegatedFrameData> child_frame_data(new DelegatedFrameData); 1316 std::unique_ptr<DelegatedFrameData> child_frame_data(
1317 new DelegatedFrameData);
1312 child_pass_list.swap(child_frame_data->render_pass_list); 1318 child_pass_list.swap(child_frame_data->render_pass_list);
1313 1319
1314 scoped_ptr<CompositorFrame> child_frame(new CompositorFrame); 1320 std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
1315 child_frame->delegated_frame_data = std::move(child_frame_data); 1321 child_frame->delegated_frame_data = std::move(child_frame_data);
1316 1322
1317 factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame), 1323 factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
1318 SurfaceFactory::DrawCallback()); 1324 SurfaceFactory::DrawCallback());
1319 1325
1320 scoped_ptr<CompositorFrame> aggregated_frame = 1326 std::unique_ptr<CompositorFrame> aggregated_frame =
1321 aggregator_.Aggregate(root_surface_id_); 1327 aggregator_.Aggregate(root_surface_id_);
1322 1328
1323 ASSERT_TRUE(aggregated_frame); 1329 ASSERT_TRUE(aggregated_frame);
1324 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 1330 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
1325 1331
1326 DelegatedFrameData* frame_data = 1332 DelegatedFrameData* frame_data =
1327 aggregated_frame->delegated_frame_data.get(); 1333 aggregated_frame->delegated_frame_data.get();
1328 1334
1329 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 1335 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
1330 1336
(...skipping 10 matching lines...) Expand all
1341 AddPasses(&root_pass_list, 1347 AddPasses(&root_pass_list,
1342 gfx::Rect(SurfaceSize()), 1348 gfx::Rect(SurfaceSize()),
1343 root_passes, 1349 root_passes,
1344 arraysize(root_passes)); 1350 arraysize(root_passes));
1345 1351
1346 root_pass_list[0] 1352 root_pass_list[0]
1347 ->shared_quad_state_list.front() 1353 ->shared_quad_state_list.front()
1348 ->quad_to_target_transform.Translate(0, 10); 1354 ->quad_to_target_transform.Translate(0, 10);
1349 root_pass_list[0]->damage_rect = gfx::Rect(0, 0, 1, 1); 1355 root_pass_list[0]->damage_rect = gfx::Rect(0, 0, 1, 1);
1350 1356
1351 scoped_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData); 1357 std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
1352 root_pass_list.swap(root_frame_data->render_pass_list); 1358 root_pass_list.swap(root_frame_data->render_pass_list);
1353 1359
1354 scoped_ptr<CompositorFrame> root_frame(new CompositorFrame); 1360 std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
1355 root_frame->delegated_frame_data = std::move(root_frame_data); 1361 root_frame->delegated_frame_data = std::move(root_frame_data);
1356 1362
1357 factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame), 1363 factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame),
1358 SurfaceFactory::DrawCallback()); 1364 SurfaceFactory::DrawCallback());
1359 } 1365 }
1360 1366
1361 { 1367 {
1362 RenderPassList root_pass_list; 1368 RenderPassList root_pass_list;
1363 AddPasses(&root_pass_list, 1369 AddPasses(&root_pass_list,
1364 gfx::Rect(SurfaceSize()), 1370 gfx::Rect(SurfaceSize()),
1365 root_passes, 1371 root_passes,
1366 arraysize(root_passes)); 1372 arraysize(root_passes));
1367 1373
1368 root_pass_list[0] 1374 root_pass_list[0]
1369 ->shared_quad_state_list.front() 1375 ->shared_quad_state_list.front()
1370 ->quad_to_target_transform.Translate(0, 10); 1376 ->quad_to_target_transform.Translate(0, 10);
1371 root_pass_list[0]->damage_rect = gfx::Rect(1, 1, 1, 1); 1377 root_pass_list[0]->damage_rect = gfx::Rect(1, 1, 1, 1);
1372 1378
1373 scoped_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData); 1379 std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
1374 root_pass_list.swap(root_frame_data->render_pass_list); 1380 root_pass_list.swap(root_frame_data->render_pass_list);
1375 1381
1376 scoped_ptr<CompositorFrame> root_frame(new CompositorFrame); 1382 std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
1377 root_frame->delegated_frame_data = std::move(root_frame_data); 1383 root_frame->delegated_frame_data = std::move(root_frame_data);
1378 1384
1379 factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame), 1385 factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame),
1380 SurfaceFactory::DrawCallback()); 1386 SurfaceFactory::DrawCallback());
1381 1387
1382 scoped_ptr<CompositorFrame> aggregated_frame = 1388 std::unique_ptr<CompositorFrame> aggregated_frame =
1383 aggregator_.Aggregate(root_surface_id_); 1389 aggregator_.Aggregate(root_surface_id_);
1384 1390
1385 ASSERT_TRUE(aggregated_frame); 1391 ASSERT_TRUE(aggregated_frame);
1386 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 1392 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
1387 1393
1388 DelegatedFrameData* frame_data = 1394 DelegatedFrameData* frame_data =
1389 aggregated_frame->delegated_frame_data.get(); 1395 aggregated_frame->delegated_frame_data.get();
1390 1396
1391 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 1397 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
1392 1398
1393 ASSERT_EQ(2u, aggregated_pass_list.size()); 1399 ASSERT_EQ(2u, aggregated_pass_list.size());
1394 1400
1395 // The root surface was enqueued without being aggregated once, so it should 1401 // The root surface was enqueued without being aggregated once, so it should
1396 // be treated as completely damaged. 1402 // be treated as completely damaged.
1397 EXPECT_TRUE(aggregated_pass_list[1]->damage_rect.Contains( 1403 EXPECT_TRUE(aggregated_pass_list[1]->damage_rect.Contains(
1398 gfx::Rect(SurfaceSize()))); 1404 gfx::Rect(SurfaceSize())));
1399 } 1405 }
1400 1406
1401 // No Surface changed, so no damage should be given. 1407 // No Surface changed, so no damage should be given.
1402 { 1408 {
1403 scoped_ptr<CompositorFrame> aggregated_frame = 1409 std::unique_ptr<CompositorFrame> aggregated_frame =
1404 aggregator_.Aggregate(root_surface_id_); 1410 aggregator_.Aggregate(root_surface_id_);
1405 1411
1406 ASSERT_TRUE(aggregated_frame); 1412 ASSERT_TRUE(aggregated_frame);
1407 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 1413 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
1408 1414
1409 DelegatedFrameData* frame_data = 1415 DelegatedFrameData* frame_data =
1410 aggregated_frame->delegated_frame_data.get(); 1416 aggregated_frame->delegated_frame_data.get();
1411 1417
1412 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 1418 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
1413 1419
1414 ASSERT_EQ(2u, aggregated_pass_list.size()); 1420 ASSERT_EQ(2u, aggregated_pass_list.size());
1415 1421
1416 EXPECT_TRUE(aggregated_pass_list[1]->damage_rect.IsEmpty()); 1422 EXPECT_TRUE(aggregated_pass_list[1]->damage_rect.IsEmpty());
1417 } 1423 }
1418 1424
1419 // SetFullDamageRectForSurface should cause the entire output to be 1425 // SetFullDamageRectForSurface should cause the entire output to be
1420 // marked as damaged. 1426 // marked as damaged.
1421 { 1427 {
1422 aggregator_.SetFullDamageForSurface(root_surface_id_); 1428 aggregator_.SetFullDamageForSurface(root_surface_id_);
1423 scoped_ptr<CompositorFrame> aggregated_frame = 1429 std::unique_ptr<CompositorFrame> aggregated_frame =
1424 aggregator_.Aggregate(root_surface_id_); 1430 aggregator_.Aggregate(root_surface_id_);
1425 1431
1426 ASSERT_TRUE(aggregated_frame); 1432 ASSERT_TRUE(aggregated_frame);
1427 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 1433 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
1428 1434
1429 DelegatedFrameData* frame_data = 1435 DelegatedFrameData* frame_data =
1430 aggregated_frame->delegated_frame_data.get(); 1436 aggregated_frame->delegated_frame_data.get();
1431 1437
1432 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 1438 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
1433 1439
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 arraysize(root_passes)); 1495 arraysize(root_passes));
1490 1496
1491 RenderPass* root_pass = root_pass_list[0].get(); 1497 RenderPass* root_pass = root_pass_list[0].get();
1492 root_pass->shared_quad_state_list.front() 1498 root_pass->shared_quad_state_list.front()
1493 ->quad_to_target_transform.Translate(10, 10); 1499 ->quad_to_target_transform.Translate(10, 10);
1494 root_pass->damage_rect = gfx::Rect(0, 0, 1, 1); 1500 root_pass->damage_rect = gfx::Rect(0, 0, 1, 1);
1495 1501
1496 SubmitPassListAsFrame(root_surface_id_, &root_pass_list); 1502 SubmitPassListAsFrame(root_surface_id_, &root_pass_list);
1497 } 1503 }
1498 1504
1499 scoped_ptr<CompositorFrame> aggregated_frame = 1505 std::unique_ptr<CompositorFrame> aggregated_frame =
1500 aggregator_.Aggregate(root_surface_id_); 1506 aggregator_.Aggregate(root_surface_id_);
1501 1507
1502 ASSERT_TRUE(aggregated_frame); 1508 ASSERT_TRUE(aggregated_frame);
1503 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 1509 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
1504 1510
1505 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get(); 1511 DelegatedFrameData* frame_data = aggregated_frame->delegated_frame_data.get();
1506 1512
1507 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 1513 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
1508 1514
1509 ASSERT_EQ(2u, aggregated_pass_list.size()); 1515 ASSERT_EQ(2u, aggregated_pass_list.size());
(...skipping 14 matching lines...) Expand all
1524 arraysize(root_passes)); 1530 arraysize(root_passes));
1525 1531
1526 RenderPass* root_pass = root_pass_list[0].get(); 1532 RenderPass* root_pass = root_pass_list[0].get();
1527 root_pass->shared_quad_state_list.front() 1533 root_pass->shared_quad_state_list.front()
1528 ->quad_to_target_transform.Translate(10, 10); 1534 ->quad_to_target_transform.Translate(10, 10);
1529 root_pass->damage_rect = gfx::Rect(10, 10, 2, 2); 1535 root_pass->damage_rect = gfx::Rect(10, 10, 2, 2);
1530 SubmitPassListAsFrame(root_surface_id_, &root_pass_list); 1536 SubmitPassListAsFrame(root_surface_id_, &root_pass_list);
1531 } 1537 }
1532 1538
1533 { 1539 {
1534 scoped_ptr<CompositorFrame> aggregated_frame = 1540 std::unique_ptr<CompositorFrame> aggregated_frame =
1535 aggregator_.Aggregate(root_surface_id_); 1541 aggregator_.Aggregate(root_surface_id_);
1536 1542
1537 ASSERT_TRUE(aggregated_frame); 1543 ASSERT_TRUE(aggregated_frame);
1538 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 1544 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
1539 1545
1540 DelegatedFrameData* frame_data = 1546 DelegatedFrameData* frame_data =
1541 aggregated_frame->delegated_frame_data.get(); 1547 aggregated_frame->delegated_frame_data.get();
1542 1548
1543 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 1549 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
1544 1550
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 1585
1580 RenderPass* child_root_pass = child_pass_list[1].get(); 1586 RenderPass* child_root_pass = child_pass_list[1].get();
1581 1587
1582 child_root_pass->copy_requests.push_back( 1588 child_root_pass->copy_requests.push_back(
1583 CopyOutputRequest::CreateEmptyRequest()); 1589 CopyOutputRequest::CreateEmptyRequest());
1584 child_root_pass->damage_rect = gfx::Rect(); 1590 child_root_pass->damage_rect = gfx::Rect();
1585 SubmitPassListAsFrame(child_surface_id, &child_pass_list); 1591 SubmitPassListAsFrame(child_surface_id, &child_pass_list);
1586 } 1592 }
1587 1593
1588 { 1594 {
1589 scoped_ptr<CompositorFrame> aggregated_frame = 1595 std::unique_ptr<CompositorFrame> aggregated_frame =
1590 aggregator_.Aggregate(root_surface_id_); 1596 aggregator_.Aggregate(root_surface_id_);
1591 1597
1592 ASSERT_TRUE(aggregated_frame); 1598 ASSERT_TRUE(aggregated_frame);
1593 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 1599 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
1594 1600
1595 DelegatedFrameData* frame_data = 1601 DelegatedFrameData* frame_data =
1596 aggregated_frame->delegated_frame_data.get(); 1602 aggregated_frame->delegated_frame_data.get();
1597 1603
1598 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 1604 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
1599 1605
1600 // Output frame should have no damage, but all quads included. 1606 // Output frame should have no damage, but all quads included.
1601 ASSERT_EQ(3u, aggregated_pass_list.size()); 1607 ASSERT_EQ(3u, aggregated_pass_list.size());
1602 1608
1603 EXPECT_TRUE(aggregated_pass_list[1]->damage_rect.IsEmpty()); 1609 EXPECT_TRUE(aggregated_pass_list[1]->damage_rect.IsEmpty());
1604 ASSERT_EQ(1u, aggregated_pass_list[0]->quad_list.size()); 1610 ASSERT_EQ(1u, aggregated_pass_list[0]->quad_list.size());
1605 ASSERT_EQ(1u, aggregated_pass_list[1]->quad_list.size()); 1611 ASSERT_EQ(1u, aggregated_pass_list[1]->quad_list.size());
1606 EXPECT_EQ(gfx::Rect(1, 1, 2, 2), 1612 EXPECT_EQ(gfx::Rect(1, 1, 2, 2),
1607 aggregated_pass_list[0]->quad_list.ElementAt(0)->visible_rect); 1613 aggregated_pass_list[0]->quad_list.ElementAt(0)->visible_rect);
1608 EXPECT_EQ(gfx::Rect(0, 0, 2, 2), 1614 EXPECT_EQ(gfx::Rect(0, 0, 2, 2),
1609 aggregated_pass_list[1]->quad_list.ElementAt(0)->visible_rect); 1615 aggregated_pass_list[1]->quad_list.ElementAt(0)->visible_rect);
1610 } 1616 }
1611 1617
1612 { 1618 {
1613 scoped_ptr<CompositorFrame> aggregated_frame = 1619 std::unique_ptr<CompositorFrame> aggregated_frame =
1614 aggregator_.Aggregate(root_surface_id_); 1620 aggregator_.Aggregate(root_surface_id_);
1615 1621
1616 ASSERT_TRUE(aggregated_frame); 1622 ASSERT_TRUE(aggregated_frame);
1617 ASSERT_TRUE(aggregated_frame->delegated_frame_data); 1623 ASSERT_TRUE(aggregated_frame->delegated_frame_data);
1618 1624
1619 DelegatedFrameData* frame_data = 1625 DelegatedFrameData* frame_data =
1620 aggregated_frame->delegated_frame_data.get(); 1626 aggregated_frame->delegated_frame_data.get();
1621 1627
1622 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list; 1628 const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
1623 // There were no changes since last aggregation, so output should be empty 1629 // There were no changes since last aggregation, so output should be empty
1624 // and have no damage. 1630 // and have no damage.
1625 ASSERT_EQ(1u, aggregated_pass_list.size()); 1631 ASSERT_EQ(1u, aggregated_pass_list.size());
1626 EXPECT_TRUE(aggregated_pass_list[0]->damage_rect.IsEmpty()); 1632 EXPECT_TRUE(aggregated_pass_list[0]->damage_rect.IsEmpty());
1627 ASSERT_EQ(0u, aggregated_pass_list[0]->quad_list.size()); 1633 ASSERT_EQ(0u, aggregated_pass_list[0]->quad_list.size());
1628 } 1634 }
1629 1635
1630 factory_.Destroy(child_surface_id); 1636 factory_.Destroy(child_surface_id);
1631 } 1637 }
1632 1638
1633 class SurfaceAggregatorWithResourcesTest : public testing::Test { 1639 class SurfaceAggregatorWithResourcesTest : public testing::Test {
1634 public: 1640 public:
1635 void SetUp() override { 1641 void SetUp() override {
1636 output_surface_ = FakeOutputSurface::CreateSoftware( 1642 output_surface_ = FakeOutputSurface::CreateSoftware(
1637 make_scoped_ptr(new SoftwareOutputDevice)); 1643 base::WrapUnique(new SoftwareOutputDevice));
1638 output_surface_->BindToClient(&output_surface_client_); 1644 output_surface_->BindToClient(&output_surface_client_);
1639 shared_bitmap_manager_.reset(new TestSharedBitmapManager); 1645 shared_bitmap_manager_.reset(new TestSharedBitmapManager);
1640 1646
1641 resource_provider_ = FakeResourceProvider::Create( 1647 resource_provider_ = FakeResourceProvider::Create(
1642 output_surface_.get(), shared_bitmap_manager_.get()); 1648 output_surface_.get(), shared_bitmap_manager_.get());
1643 1649
1644 aggregator_.reset( 1650 aggregator_.reset(
1645 new SurfaceAggregator(&manager_, resource_provider_.get(), false)); 1651 new SurfaceAggregator(&manager_, resource_provider_.get(), false));
1646 } 1652 }
1647 1653
1648 protected: 1654 protected:
1649 SurfaceManager manager_; 1655 SurfaceManager manager_;
1650 FakeOutputSurfaceClient output_surface_client_; 1656 FakeOutputSurfaceClient output_surface_client_;
1651 scoped_ptr<OutputSurface> output_surface_; 1657 std::unique_ptr<OutputSurface> output_surface_;
1652 scoped_ptr<SharedBitmapManager> shared_bitmap_manager_; 1658 std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
1653 scoped_ptr<ResourceProvider> resource_provider_; 1659 std::unique_ptr<ResourceProvider> resource_provider_;
1654 scoped_ptr<SurfaceAggregator> aggregator_; 1660 std::unique_ptr<SurfaceAggregator> aggregator_;
1655 }; 1661 };
1656 1662
1657 class ResourceTrackingSurfaceFactoryClient : public SurfaceFactoryClient { 1663 class ResourceTrackingSurfaceFactoryClient : public SurfaceFactoryClient {
1658 public: 1664 public:
1659 ResourceTrackingSurfaceFactoryClient() {} 1665 ResourceTrackingSurfaceFactoryClient() {}
1660 ~ResourceTrackingSurfaceFactoryClient() override {} 1666 ~ResourceTrackingSurfaceFactoryClient() override {}
1661 1667
1662 void ReturnResources(const ReturnedResourceArray& resources) override { 1668 void ReturnResources(const ReturnedResourceArray& resources) override {
1663 returned_resources_ = resources; 1669 returned_resources_ = resources;
1664 } 1670 }
1665 1671
1666 ReturnedResourceArray returned_resources() const { 1672 ReturnedResourceArray returned_resources() const {
1667 return returned_resources_; 1673 return returned_resources_;
1668 } 1674 }
1669 1675
1670 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override {} 1676 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override {}
1671 1677
1672 private: 1678 private:
1673 ReturnedResourceArray returned_resources_; 1679 ReturnedResourceArray returned_resources_;
1674 1680
1675 DISALLOW_COPY_AND_ASSIGN(ResourceTrackingSurfaceFactoryClient); 1681 DISALLOW_COPY_AND_ASSIGN(ResourceTrackingSurfaceFactoryClient);
1676 }; 1682 };
1677 1683
1678 void SubmitCompositorFrameWithResources(ResourceId* resource_ids, 1684 void SubmitCompositorFrameWithResources(ResourceId* resource_ids,
1679 size_t num_resource_ids, 1685 size_t num_resource_ids,
1680 bool valid, 1686 bool valid,
1681 SurfaceId child_id, 1687 SurfaceId child_id,
1682 SurfaceFactory* factory, 1688 SurfaceFactory* factory,
1683 SurfaceId surface_id) { 1689 SurfaceId surface_id) {
1684 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); 1690 std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
1685 scoped_ptr<RenderPass> pass = RenderPass::Create(); 1691 std::unique_ptr<RenderPass> pass = RenderPass::Create();
1686 pass->id = RenderPassId(1, 1); 1692 pass->id = RenderPassId(1, 1);
1687 SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState(); 1693 SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState();
1688 sqs->opacity = 1.f; 1694 sqs->opacity = 1.f;
1689 if (!child_id.is_null()) { 1695 if (!child_id.is_null()) {
1690 SurfaceDrawQuad* surface_quad = 1696 SurfaceDrawQuad* surface_quad =
1691 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); 1697 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
1692 surface_quad->SetNew(sqs, gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), 1698 surface_quad->SetNew(sqs, gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1),
1693 child_id); 1699 child_id);
1694 } 1700 }
1695 1701
(...skipping 14 matching lines...) Expand all
1710 SkColor background_color = SK_ColorGREEN; 1716 SkColor background_color = SK_ColorGREEN;
1711 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f}; 1717 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f};
1712 bool flipped = false; 1718 bool flipped = false;
1713 bool nearest_neighbor = false; 1719 bool nearest_neighbor = false;
1714 quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending, 1720 quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending,
1715 resource_ids[i], gfx::Size(), premultiplied_alpha, uv_top_left, 1721 resource_ids[i], gfx::Size(), premultiplied_alpha, uv_top_left,
1716 uv_bottom_right, background_color, vertex_opacity, flipped, 1722 uv_bottom_right, background_color, vertex_opacity, flipped,
1717 nearest_neighbor); 1723 nearest_neighbor);
1718 } 1724 }
1719 frame_data->render_pass_list.push_back(std::move(pass)); 1725 frame_data->render_pass_list.push_back(std::move(pass));
1720 scoped_ptr<CompositorFrame> frame(new CompositorFrame); 1726 std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
1721 frame->delegated_frame_data = std::move(frame_data); 1727 frame->delegated_frame_data = std::move(frame_data);
1722 factory->SubmitCompositorFrame(surface_id, std::move(frame), 1728 factory->SubmitCompositorFrame(surface_id, std::move(frame),
1723 SurfaceFactory::DrawCallback()); 1729 SurfaceFactory::DrawCallback());
1724 } 1730 }
1725 1731
1726 TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) { 1732 TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) {
1727 ResourceTrackingSurfaceFactoryClient client; 1733 ResourceTrackingSurfaceFactoryClient client;
1728 SurfaceFactory factory(&manager_, &client); 1734 SurfaceFactory factory(&manager_, &client);
1729 SurfaceId surface_id(7u); 1735 SurfaceId surface_id(7u);
1730 factory.Create(surface_id); 1736 factory.Create(surface_id);
1731 1737
1732 ResourceId ids[] = {11, 12, 13}; 1738 ResourceId ids[] = {11, 12, 13};
1733 SubmitCompositorFrameWithResources(ids, arraysize(ids), true, SurfaceId(), 1739 SubmitCompositorFrameWithResources(ids, arraysize(ids), true, SurfaceId(),
1734 &factory, surface_id); 1740 &factory, surface_id);
1735 1741
1736 scoped_ptr<CompositorFrame> frame = aggregator_->Aggregate(surface_id); 1742 std::unique_ptr<CompositorFrame> frame = aggregator_->Aggregate(surface_id);
1737 1743
1738 // Nothing should be available to be returned yet. 1744 // Nothing should be available to be returned yet.
1739 EXPECT_TRUE(client.returned_resources().empty()); 1745 EXPECT_TRUE(client.returned_resources().empty());
1740 1746
1741 SubmitCompositorFrameWithResources(NULL, 0u, true, SurfaceId(), &factory, 1747 SubmitCompositorFrameWithResources(NULL, 0u, true, SurfaceId(), &factory,
1742 surface_id); 1748 surface_id);
1743 1749
1744 frame = aggregator_->Aggregate(surface_id); 1750 frame = aggregator_->Aggregate(surface_id);
1745 1751
1746 ASSERT_EQ(3u, client.returned_resources().size()); 1752 ASSERT_EQ(3u, client.returned_resources().size());
1747 ResourceId returned_ids[3]; 1753 ResourceId returned_ids[3];
1748 for (size_t i = 0; i < 3; ++i) { 1754 for (size_t i = 0; i < 3; ++i) {
1749 returned_ids[i] = client.returned_resources()[i].id; 1755 returned_ids[i] = client.returned_resources()[i].id;
1750 } 1756 }
1751 EXPECT_THAT(returned_ids, 1757 EXPECT_THAT(returned_ids,
1752 testing::WhenSorted(testing::ElementsAreArray(ids))); 1758 testing::WhenSorted(testing::ElementsAreArray(ids)));
1753 factory.Destroy(surface_id); 1759 factory.Destroy(surface_id);
1754 } 1760 }
1755 1761
1756 TEST_F(SurfaceAggregatorWithResourcesTest, TakeInvalidResources) { 1762 TEST_F(SurfaceAggregatorWithResourcesTest, TakeInvalidResources) {
1757 ResourceTrackingSurfaceFactoryClient client; 1763 ResourceTrackingSurfaceFactoryClient client;
1758 SurfaceFactory factory(&manager_, &client); 1764 SurfaceFactory factory(&manager_, &client);
1759 SurfaceId surface_id(7u); 1765 SurfaceId surface_id(7u);
1760 factory.Create(surface_id); 1766 factory.Create(surface_id);
1761 1767
1762 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); 1768 std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
1763 scoped_ptr<RenderPass> pass = RenderPass::Create(); 1769 std::unique_ptr<RenderPass> pass = RenderPass::Create();
1764 pass->id = RenderPassId(1, 1); 1770 pass->id = RenderPassId(1, 1);
1765 TransferableResource resource; 1771 TransferableResource resource;
1766 resource.id = 11; 1772 resource.id = 11;
1767 // ResourceProvider is software but resource is not, so it should be 1773 // ResourceProvider is software but resource is not, so it should be
1768 // ignored. 1774 // ignored.
1769 resource.is_software = false; 1775 resource.is_software = false;
1770 frame_data->resource_list.push_back(resource); 1776 frame_data->resource_list.push_back(resource);
1771 frame_data->render_pass_list.push_back(std::move(pass)); 1777 frame_data->render_pass_list.push_back(std::move(pass));
1772 scoped_ptr<CompositorFrame> frame(new CompositorFrame); 1778 std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
1773 frame->delegated_frame_data = std::move(frame_data); 1779 frame->delegated_frame_data = std::move(frame_data);
1774 factory.SubmitCompositorFrame(surface_id, std::move(frame), 1780 factory.SubmitCompositorFrame(surface_id, std::move(frame),
1775 SurfaceFactory::DrawCallback()); 1781 SurfaceFactory::DrawCallback());
1776 1782
1777 scoped_ptr<CompositorFrame> returned_frame = 1783 std::unique_ptr<CompositorFrame> returned_frame =
1778 aggregator_->Aggregate(surface_id); 1784 aggregator_->Aggregate(surface_id);
1779 1785
1780 // Nothing should be available to be returned yet. 1786 // Nothing should be available to be returned yet.
1781 EXPECT_TRUE(client.returned_resources().empty()); 1787 EXPECT_TRUE(client.returned_resources().empty());
1782 1788
1783 SubmitCompositorFrameWithResources(NULL, 0, true, SurfaceId(), &factory, 1789 SubmitCompositorFrameWithResources(NULL, 0, true, SurfaceId(), &factory,
1784 surface_id); 1790 surface_id);
1785 ASSERT_EQ(1u, client.returned_resources().size()); 1791 ASSERT_EQ(1u, client.returned_resources().size());
1786 EXPECT_EQ(11u, client.returned_resources()[0].id); 1792 EXPECT_EQ(11u, client.returned_resources()[0].id);
1787 1793
1788 factory.Destroy(surface_id); 1794 factory.Destroy(surface_id);
1789 } 1795 }
1790 1796
1791 TEST_F(SurfaceAggregatorWithResourcesTest, TwoSurfaces) { 1797 TEST_F(SurfaceAggregatorWithResourcesTest, TwoSurfaces) {
1792 ResourceTrackingSurfaceFactoryClient client; 1798 ResourceTrackingSurfaceFactoryClient client;
1793 SurfaceFactory factory(&manager_, &client); 1799 SurfaceFactory factory(&manager_, &client);
1794 SurfaceId surface1_id(7u); 1800 SurfaceId surface1_id(7u);
1795 factory.Create(surface1_id); 1801 factory.Create(surface1_id);
1796 1802
1797 SurfaceId surface2_id(8u); 1803 SurfaceId surface2_id(8u);
1798 factory.Create(surface2_id); 1804 factory.Create(surface2_id);
1799 1805
1800 ResourceId ids[] = {11, 12, 13}; 1806 ResourceId ids[] = {11, 12, 13};
1801 SubmitCompositorFrameWithResources(ids, arraysize(ids), true, SurfaceId(), 1807 SubmitCompositorFrameWithResources(ids, arraysize(ids), true, SurfaceId(),
1802 &factory, surface1_id); 1808 &factory, surface1_id);
1803 ResourceId ids2[] = {14, 15, 16}; 1809 ResourceId ids2[] = {14, 15, 16};
1804 SubmitCompositorFrameWithResources(ids2, arraysize(ids2), true, SurfaceId(), 1810 SubmitCompositorFrameWithResources(ids2, arraysize(ids2), true, SurfaceId(),
1805 &factory, surface2_id); 1811 &factory, surface2_id);
1806 1812
1807 scoped_ptr<CompositorFrame> frame = aggregator_->Aggregate(surface1_id); 1813 std::unique_ptr<CompositorFrame> frame = aggregator_->Aggregate(surface1_id);
1808 1814
1809 SubmitCompositorFrameWithResources(NULL, 0, true, SurfaceId(), &factory, 1815 SubmitCompositorFrameWithResources(NULL, 0, true, SurfaceId(), &factory,
1810 surface1_id); 1816 surface1_id);
1811 1817
1812 // Nothing should be available to be returned yet. 1818 // Nothing should be available to be returned yet.
1813 EXPECT_TRUE(client.returned_resources().empty()); 1819 EXPECT_TRUE(client.returned_resources().empty());
1814 1820
1815 frame = aggregator_->Aggregate(surface2_id); 1821 frame = aggregator_->Aggregate(surface2_id);
1816 1822
1817 // surface1_id wasn't referenced, so its resources should be returned. 1823 // surface1_id wasn't referenced, so its resources should be returned.
(...skipping 28 matching lines...) Expand all
1846 ResourceId ids2[] = {17, 18, 19}; 1852 ResourceId ids2[] = {17, 18, 19};
1847 SubmitCompositorFrameWithResources(ids2, arraysize(ids2), false, 1853 SubmitCompositorFrameWithResources(ids2, arraysize(ids2), false,
1848 child_surface_id, &factory, 1854 child_surface_id, &factory,
1849 middle_surface_id); 1855 middle_surface_id);
1850 1856
1851 ResourceId ids3[] = {20, 21, 22}; 1857 ResourceId ids3[] = {20, 21, 22};
1852 SubmitCompositorFrameWithResources(ids3, arraysize(ids3), true, 1858 SubmitCompositorFrameWithResources(ids3, arraysize(ids3), true,
1853 middle_surface_id, &factory, 1859 middle_surface_id, &factory,
1854 root_surface_id); 1860 root_surface_id);
1855 1861
1856 scoped_ptr<CompositorFrame> frame; 1862 std::unique_ptr<CompositorFrame> frame;
1857 frame = aggregator_->Aggregate(root_surface_id); 1863 frame = aggregator_->Aggregate(root_surface_id);
1858 1864
1859 RenderPassList* pass_list = &frame->delegated_frame_data->render_pass_list; 1865 RenderPassList* pass_list = &frame->delegated_frame_data->render_pass_list;
1860 ASSERT_EQ(1u, pass_list->size()); 1866 ASSERT_EQ(1u, pass_list->size());
1861 EXPECT_EQ(1u, pass_list->back()->shared_quad_state_list.size()); 1867 EXPECT_EQ(1u, pass_list->back()->shared_quad_state_list.size());
1862 EXPECT_EQ(3u, pass_list->back()->quad_list.size()); 1868 EXPECT_EQ(3u, pass_list->back()->quad_list.size());
1863 1869
1864 SubmitCompositorFrameWithResources(ids2, arraysize(ids), true, 1870 SubmitCompositorFrameWithResources(ids2, arraysize(ids), true,
1865 child_surface_id, &factory, 1871 child_surface_id, &factory,
1866 middle_surface_id); 1872 middle_surface_id);
1867 1873
1868 frame = aggregator_->Aggregate(root_surface_id); 1874 frame = aggregator_->Aggregate(root_surface_id);
1869 1875
1870 pass_list = &frame->delegated_frame_data->render_pass_list; 1876 pass_list = &frame->delegated_frame_data->render_pass_list;
1871 ASSERT_EQ(1u, pass_list->size()); 1877 ASSERT_EQ(1u, pass_list->size());
1872 EXPECT_EQ(3u, pass_list->back()->shared_quad_state_list.size()); 1878 EXPECT_EQ(3u, pass_list->back()->shared_quad_state_list.size());
1873 EXPECT_EQ(9u, pass_list->back()->quad_list.size()); 1879 EXPECT_EQ(9u, pass_list->back()->quad_list.size());
1874 1880
1875 factory.Destroy(root_surface_id); 1881 factory.Destroy(root_surface_id);
1876 factory.Destroy(child_surface_id); 1882 factory.Destroy(child_surface_id);
1877 factory.Destroy(middle_surface_id); 1883 factory.Destroy(middle_surface_id);
1878 } 1884 }
1879 1885
1880 } // namespace 1886 } // namespace
1881 } // namespace cc 1887 } // namespace cc
1882 1888
OLDNEW
« no previous file with comments | « cc/surfaces/surface_aggregator_perftest.cc ('k') | cc/surfaces/surface_display_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698