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

Side by Side Diff: cc/layers/delegated_frame_provider_unittest.cc

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/debug/ring_buffer.h ('k') | cc/layers/delegated_frame_resource_collection_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 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/layers/delegated_frame_provider.h" 5 #include "cc/layers/delegated_frame_provider.h"
6 #include "cc/layers/delegated_frame_resource_collection.h" 6 #include "cc/layers/delegated_frame_resource_collection.h"
7 #include "cc/layers/delegated_renderer_layer.h" 7 #include "cc/layers/delegated_renderer_layer.h"
8 #include "cc/output/delegated_frame_data.h" 8 #include "cc/output/delegated_frame_data.h"
9 #include "cc/quads/texture_draw_quad.h" 9 #include "cc/quads/texture_draw_quad.h"
10 #include "cc/resources/returned_resource.h" 10 #include "cc/resources/returned_resource.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 gfx::Rect(0, 0, 10, 10), 55 gfx::Rect(0, 0, 10, 10),
56 resource_id, 56 resource_id,
57 false, 57 false,
58 gfx::PointF(0.f, 0.f), 58 gfx::PointF(0.f, 0.f),
59 gfx::PointF(1.f, 1.f), 59 gfx::PointF(1.f, 1.f),
60 SK_ColorTRANSPARENT, 60 SK_ColorTRANSPARENT,
61 vertex_opacity, 61 vertex_opacity,
62 false); 62 false);
63 } 63 }
64 64
65 virtual void SetUp() override { 65 void SetUp() override {
66 resource_collection_ = new DelegatedFrameResourceCollection; 66 resource_collection_ = new DelegatedFrameResourceCollection;
67 resource_collection_->SetClient(this); 67 resource_collection_->SetClient(this);
68 } 68 }
69 69
70 virtual void TearDown() override { resource_collection_->SetClient(nullptr); } 70 void TearDown() override { resource_collection_->SetClient(nullptr); }
71 71
72 void UnusedResourcesAreAvailable() override { 72 void UnusedResourcesAreAvailable() override {
73 resources_available_ = true; 73 resources_available_ = true;
74 resource_collection_->TakeUnusedResourcesForChildCompositor(&resources_); 74 resource_collection_->TakeUnusedResourcesForChildCompositor(&resources_);
75 } 75 }
76 76
77 bool ReturnAndResetResourcesAvailable() { 77 bool ReturnAndResetResourcesAvailable() {
78 bool r = resources_available_; 78 bool r = resources_available_;
79 resources_available_ = false; 79 resources_available_ = false;
80 return r; 80 return r;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 frame_provider_ = nullptr; 389 frame_provider_ = nullptr;
390 390
391 // Nothing is returned twice. 391 // Nothing is returned twice.
392 EXPECT_FALSE(ReturnAndResetResourcesAvailable()); 392 EXPECT_FALSE(ReturnAndResetResourcesAvailable());
393 EXPECT_EQ(0u, resources_.size()); 393 EXPECT_EQ(0u, resources_.size());
394 } 394 }
395 395
396 } // namespace 396 } // namespace
397 } // namespace cc 397 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/ring_buffer.h ('k') | cc/layers/delegated_frame_resource_collection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698