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

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

Issue 645853008: Standardize usage of virtual/override/final in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 6 years, 2 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/delegated_frame_provider_unittest.cc ('k') | cc/layers/delegated_renderer_layer.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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "cc/layers/delegated_frame_resource_collection.h" 9 #include "cc/layers/delegated_frame_resource_collection.h"
10 #include "cc/resources/returned_resource.h" 10 #include "cc/resources/returned_resource.h"
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 TransferableResourceArray CreateResourceArray() { 41 TransferableResourceArray CreateResourceArray() {
42 TransferableResourceArray resources; 42 TransferableResourceArray resources;
43 TransferableResource resource; 43 TransferableResource resource;
44 resource.id = 444; 44 resource.id = 444;
45 resources.push_back(resource); 45 resources.push_back(resource);
46 return resources; 46 return resources;
47 } 47 }
48 48
49 virtual void UnusedResourcesAreAvailable() override { 49 void UnusedResourcesAreAvailable() override {
50 resources_available_ = true; 50 resources_available_ = true;
51 resource_collection_->TakeUnusedResourcesForChildCompositor( 51 resource_collection_->TakeUnusedResourcesForChildCompositor(
52 &returned_resources_); 52 &returned_resources_);
53 if (!resources_available_closure_.is_null()) 53 if (!resources_available_closure_.is_null())
54 resources_available_closure_.Run(); 54 resources_available_closure_.Run();
55 } 55 }
56 56
57 bool ReturnAndResetResourcesAvailable() { 57 bool ReturnAndResetResourcesAvailable() {
58 bool r = resources_available_; 58 bool r = resources_available_;
59 resources_available_ = false; 59 resources_available_ = false;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return_callback, 157 return_callback,
158 returned_resources, 158 returned_resources,
159 null_event, 159 null_event,
160 main_thread_task_runner.get())); 160 main_thread_task_runner.get()));
161 161
162 thread.Stop(); 162 thread.Stop();
163 } 163 }
164 164
165 } // namespace 165 } // namespace
166 } // namespace cc 166 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_frame_provider_unittest.cc ('k') | cc/layers/delegated_renderer_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698