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

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

Issue 2465093002: cc: Add OutputSurface state snapshots.
Patch Set: rebase Created 3 years, 11 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/surfaces/display.h ('k') | cc/test/fake_output_surface_client.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 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 226
227 void Display::DidLoseContextProvider() { 227 void Display::DidLoseContextProvider() {
228 if (scheduler_) 228 if (scheduler_)
229 scheduler_->OutputSurfaceLost(); 229 scheduler_->OutputSurfaceLost();
230 // WARNING: The client may delete the Display in this method call. Do not 230 // WARNING: The client may delete the Display in this method call. Do not
231 // make any additional references to members after this call. 231 // make any additional references to members after this call.
232 client_->DisplayOutputSurfaceLost(); 232 client_->DisplayOutputSurfaceLost();
233 } 233 }
234 234
235 void Display::ReadbackSwappedOverlayTextures(
236 std::vector<SkBitmap>* bitmaps,
237 const base::Callback<void(bool)>& callback) {
238 renderer_->ReadbackSwappedOverlayTextures(bitmaps, callback);
239 }
240
235 bool Display::DrawAndSwap() { 241 bool Display::DrawAndSwap() {
236 TRACE_EVENT0("cc", "Display::DrawAndSwap"); 242 TRACE_EVENT0("cc", "Display::DrawAndSwap");
237 243
238 if (!current_surface_id_.is_valid()) { 244 if (!current_surface_id_.is_valid()) {
239 TRACE_EVENT_INSTANT0("cc", "No root surface.", TRACE_EVENT_SCOPE_THREAD); 245 TRACE_EVENT_INSTANT0("cc", "No root surface.", TRACE_EVENT_SCOPE_THREAD);
240 return false; 246 return false;
241 } 247 }
242 248
243 if (!output_surface_) { 249 if (!output_surface_) {
244 TRACE_EVENT_INSTANT0("cc", "No output surface", TRACE_EVENT_SCOPE_THREAD); 250 TRACE_EVENT_INSTANT0("cc", "No output surface", TRACE_EVENT_SCOPE_THREAD);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 const SurfaceId& Display::CurrentSurfaceId() { 403 const SurfaceId& Display::CurrentSurfaceId() {
398 return current_surface_id_; 404 return current_surface_id_;
399 } 405 }
400 406
401 void Display::ForceImmediateDrawAndSwapIfPossible() { 407 void Display::ForceImmediateDrawAndSwapIfPossible() {
402 if (scheduler_) 408 if (scheduler_)
403 scheduler_->ForceImmediateSwapIfPossible(); 409 scheduler_->ForceImmediateSwapIfPossible();
404 } 410 }
405 411
406 } // namespace cc 412 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/test/fake_output_surface_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698