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

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

Issue 1773873002: sync compositor: Handle context loss (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 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 "content/renderer/android/synchronous_compositor_output_surface.h" 5 #include "content/renderer/android/synchronous_compositor_output_surface.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 SynchronousCompositorOutputSurface::~SynchronousCompositorOutputSurface() {} 93 SynchronousCompositorOutputSurface::~SynchronousCompositorOutputSurface() {}
94 94
95 void SynchronousCompositorOutputSurface::SetSyncClient( 95 void SynchronousCompositorOutputSurface::SetSyncClient(
96 SynchronousCompositorOutputSurfaceClient* compositor) { 96 SynchronousCompositorOutputSurfaceClient* compositor) {
97 DCHECK(CalledOnValidThread()); 97 DCHECK(CalledOnValidThread());
98 sync_client_ = compositor; 98 sync_client_ = compositor;
99 } 99 }
100 100
101 void SynchronousCompositorOutputSurface::DidLoseOutputSurface() {
102 // Android WebView does not handle context loss.
103 LOG(FATAL) << "Renderer compositor context loss";
104 }
105
106 bool SynchronousCompositorOutputSurface::BindToClient( 101 bool SynchronousCompositorOutputSurface::BindToClient(
107 cc::OutputSurfaceClient* surface_client) { 102 cc::OutputSurfaceClient* surface_client) {
108 DCHECK(CalledOnValidThread()); 103 DCHECK(CalledOnValidThread());
109 if (!cc::OutputSurface::BindToClient(surface_client)) 104 if (!cc::OutputSurface::BindToClient(surface_client))
110 return false; 105 return false;
111 106
112 client_->SetMemoryPolicy(memory_policy_); 107 client_->SetMemoryPolicy(memory_policy_);
113 registry_->RegisterOutputSurface(routing_id_, this); 108 registry_->RegisterOutputSurface(routing_id_, this);
114 registered_ = true; 109 registered_ = true;
115 return true; 110 return true;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope = 264 scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope =
270 frame_swap_message_queue_->AcquireSendMessageScope(); 265 frame_swap_message_queue_->AcquireSendMessageScope();
271 frame_swap_message_queue_->DrainMessages(messages); 266 frame_swap_message_queue_->DrainMessages(messages);
272 } 267 }
273 268
274 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 269 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
275 return thread_checker_.CalledOnValidThread(); 270 return thread_checker_.CalledOnValidThread();
276 } 271 }
277 272
278 } // namespace content 273 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698