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

Side by Side Diff: content/renderer/android/synchronous_compositor_proxy.cc

Issue 2075343003: Use a cc::Display for layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mailbox-test
Patch Set: layouttests-display2: rebase Created 4 years, 5 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/trees/single_thread_proxy.cc ('k') | content/renderer/gpu/render_widget_compositor.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/renderer/android/synchronous_compositor_proxy.h" 5 #include "content/renderer/android/synchronous_compositor_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "cc/ipc/cc_param_traits.h" 10 #include "cc/ipc/cc_param_traits.h"
(...skipping 29 matching lines...) Expand all
40 min_page_scale_factor_(0.f), 40 min_page_scale_factor_(0.f),
41 max_page_scale_factor_(0.f), 41 max_page_scale_factor_(0.f),
42 need_animate_scroll_(false), 42 need_animate_scroll_(false),
43 need_invalidate_count_(0u), 43 need_invalidate_count_(0u),
44 did_activate_pending_tree_count_(0u) { 44 did_activate_pending_tree_count_(0u) {
45 DCHECK(input_handler_proxy_); 45 DCHECK(input_handler_proxy_);
46 input_handler_proxy_->SetOnlySynchronouslyAnimateRootFlings(this); 46 input_handler_proxy_->SetOnlySynchronouslyAnimateRootFlings(this);
47 } 47 }
48 48
49 SynchronousCompositorProxy::~SynchronousCompositorProxy() { 49 SynchronousCompositorProxy::~SynchronousCompositorProxy() {
50 SetOutputSurface(nullptr); 50 // The OutputSurface is destroyed/removed by the compositor before shutting
51 // down everything.
52 DCHECK_EQ(output_surface_, nullptr);
51 input_handler_proxy_->SetOnlySynchronouslyAnimateRootFlings(nullptr); 53 input_handler_proxy_->SetOnlySynchronouslyAnimateRootFlings(nullptr);
52 } 54 }
53 55
54 void SynchronousCompositorProxy::SetOutputSurface( 56 void SynchronousCompositorProxy::SetOutputSurface(
55 SynchronousCompositorOutputSurface* output_surface) { 57 SynchronousCompositorOutputSurface* output_surface) {
56 DCHECK_NE(output_surface_, output_surface); 58 DCHECK_NE(output_surface_, output_surface);
57 if (output_surface_) { 59 if (output_surface_) {
58 output_surface_->SetSyncClient(nullptr); 60 output_surface_->SetSyncClient(nullptr);
59 } 61 }
60 output_surface_ = output_surface; 62 output_surface_ = output_surface;
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 329
328 void SynchronousCompositorProxy::SetScroll( 330 void SynchronousCompositorProxy::SetScroll(
329 const gfx::ScrollOffset& new_total_scroll_offset) { 331 const gfx::ScrollOffset& new_total_scroll_offset) {
330 if (total_scroll_offset_ == new_total_scroll_offset) 332 if (total_scroll_offset_ == new_total_scroll_offset)
331 return; 333 return;
332 total_scroll_offset_ = new_total_scroll_offset; 334 total_scroll_offset_ = new_total_scroll_offset;
333 input_handler_proxy_->SynchronouslySetRootScrollOffset(total_scroll_offset_); 335 input_handler_proxy_->SynchronouslySetRootScrollOffset(total_scroll_offset_);
334 } 336 }
335 337
336 } // namespace content 338 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698