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

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

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/BUILD.gn ('k') | cc/surfaces/onscreen_display_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 "base/debug/trace_event.h"
8 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/trace_event/trace_event.h"
9 #include "cc/debug/benchmark_instrumentation.h" 9 #include "cc/debug/benchmark_instrumentation.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
11 #include "cc/output/compositor_frame_ack.h" 11 #include "cc/output/compositor_frame_ack.h"
12 #include "cc/output/direct_renderer.h" 12 #include "cc/output/direct_renderer.h"
13 #include "cc/output/gl_renderer.h" 13 #include "cc/output/gl_renderer.h"
14 #include "cc/output/renderer_settings.h" 14 #include "cc/output/renderer_settings.h"
15 #include "cc/output/software_renderer.h" 15 #include "cc/output/software_renderer.h"
16 #include "cc/resources/texture_mailbox_deleter.h" 16 #include "cc/resources/texture_mailbox_deleter.h"
17 #include "cc/surfaces/display_client.h" 17 #include "cc/surfaces/display_client.h"
18 #include "cc/surfaces/surface.h" 18 #include "cc/surfaces/surface.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 client_->DisplayDamaged(); 191 client_->DisplayDamaged();
192 *changed = true; 192 *changed = true;
193 } 193 }
194 } 194 }
195 195
196 SurfaceId Display::CurrentSurfaceId() { 196 SurfaceId Display::CurrentSurfaceId() {
197 return current_surface_id_; 197 return current_surface_id_;
198 } 198 }
199 199
200 int Display::GetMaxFramesPending() { 200 int Display::GetMaxFramesPending() {
201 if (!output_surface_) 201 int max_frames_pending =
202 return OutputSurface::DEFAULT_MAX_FRAMES_PENDING; 202 output_surface_ ? output_surface_->capabilities().max_frames_pending : 0;
203 return output_surface_->capabilities().max_frames_pending; 203 if (max_frames_pending <= 0)
204 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
205 return max_frames_pending;
204 } 206 }
205 207
206 } // namespace cc 208 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/BUILD.gn ('k') | cc/surfaces/onscreen_display_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698