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

Side by Side Diff: content/test/layouttest_support.cc

Issue 2185823005: Make RenderViewImpl::OnForceRedraw more robust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation again Created 4 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 | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/public/test/layouttest_support.h" 5 #include "content/public/test/layouttest_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 // cc::SwapPromise implementation. 197 // cc::SwapPromise implementation.
198 void OnCommit() override { 198 void OnCommit() override {
199 output_surface_from_commit_ = output_surface_callback_.Run(); 199 output_surface_from_commit_ = output_surface_callback_.Run();
200 DCHECK(output_surface_from_commit_); 200 DCHECK(output_surface_from_commit_);
201 } 201 }
202 void DidActivate() override {} 202 void DidActivate() override {}
203 void DidSwap(cc::CompositorFrameMetadata*) override { 203 void DidSwap(cc::CompositorFrameMetadata*) override {
204 output_surface_from_commit_->RequestCopyOfOutput(std::move(copy_request_)); 204 output_surface_from_commit_->RequestCopyOfOutput(std::move(copy_request_));
205 } 205 }
206 void DidNotSwap(DidNotSwapReason r) override { 206 DidNotSwapAction DidNotSwap(DidNotSwapReason r) override {
207 // The compositor should always swap in layout test mode. 207 // The compositor should always swap in layout test mode.
208 NOTREACHED() << "did not swap for reason " << r; 208 NOTREACHED() << "did not swap for reason " << r;
209 return DidNotSwapAction::BREAK_PROMISE;
209 } 210 }
210 int64_t TraceId() const override { return 0; } 211 int64_t TraceId() const override { return 0; }
211 212
212 private: 213 private:
213 std::unique_ptr<cc::CopyOutputRequest> copy_request_; 214 std::unique_ptr<cc::CopyOutputRequest> copy_request_;
214 FindOutputSurfaceCallback output_surface_callback_; 215 FindOutputSurfaceCallback output_surface_callback_;
215 cc::TestDelegatingOutputSurface* output_surface_from_commit_ = nullptr; 216 cc::TestDelegatingOutputSurface* output_surface_from_commit_ = nullptr;
216 }; 217 };
217 218
218 } // namespace 219 } // namespace
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 return result; 564 return result;
564 } 565 }
565 566
566 void SchedulerRunIdleTasks(const base::Closure& callback) { 567 void SchedulerRunIdleTasks(const base::Closure& callback) {
567 blink::scheduler::RendererScheduler* scheduler = 568 blink::scheduler::RendererScheduler* scheduler =
568 content::RenderThreadImpl::current()->GetRendererScheduler(); 569 content::RenderThreadImpl::current()->GetRendererScheduler();
569 blink::scheduler::RunIdleTasksForTesting(scheduler, callback); 570 blink::scheduler::RunIdleTasksForTesting(scheduler, callback);
570 } 571 }
571 572
572 } // namespace content 573 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698