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

Side by Side Diff: cc/surfaces/display.cc

Issue 2465093002: cc: Add OutputSurface state snapshots.
Patch Set: nits Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/surfaces/display.h" 5 #include "cc/surfaces/display.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 void Display::DidLoseContextProvider() { 222 void Display::DidLoseContextProvider() {
223 if (scheduler_) 223 if (scheduler_)
224 scheduler_->OutputSurfaceLost(); 224 scheduler_->OutputSurfaceLost();
225 // WARNING: The client may delete the Display in this method call. Do not 225 // WARNING: The client may delete the Display in this method call. Do not
226 // make any additional references to members after this call. 226 // make any additional references to members after this call.
227 client_->DisplayOutputSurfaceLost(); 227 client_->DisplayOutputSurfaceLost();
228 } 228 }
229 229
230 void Display::ReadbackSwappedOverlayTextures(
231 std::vector<SkBitmap>* bitmaps,
232 const base::Callback<void(bool)>& callback) {
233 renderer_->ReadbackSwappedOverlayTextures(bitmaps, callback);
234 }
235
230 bool Display::DrawAndSwap() { 236 bool Display::DrawAndSwap() {
231 TRACE_EVENT0("cc", "Display::DrawAndSwap"); 237 TRACE_EVENT0("cc", "Display::DrawAndSwap");
232 238
233 if (current_surface_id_.is_null()) { 239 if (current_surface_id_.is_null()) {
234 TRACE_EVENT_INSTANT0("cc", "No root surface.", TRACE_EVENT_SCOPE_THREAD); 240 TRACE_EVENT_INSTANT0("cc", "No root surface.", TRACE_EVENT_SCOPE_THREAD);
235 return false; 241 return false;
236 } 242 }
237 243
238 if (!output_surface_) { 244 if (!output_surface_) {
239 TRACE_EVENT_INSTANT0("cc", "No output surface", TRACE_EVENT_SCOPE_THREAD); 245 TRACE_EVENT_INSTANT0("cc", "No output surface", TRACE_EVENT_SCOPE_THREAD);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 const SurfaceId& Display::CurrentSurfaceId() { 400 const SurfaceId& Display::CurrentSurfaceId() {
395 return current_surface_id_; 401 return current_surface_id_;
396 } 402 }
397 403
398 void Display::ForceImmediateDrawAndSwapIfPossible() { 404 void Display::ForceImmediateDrawAndSwapIfPossible() {
399 if (scheduler_) 405 if (scheduler_)
400 scheduler_->ForceImmediateSwapIfPossible(); 406 scheduler_->ForceImmediateSwapIfPossible();
401 } 407 }
402 408
403 } // namespace cc 409 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698