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

Side by Side Diff: cc/output/output_surface.h

Issue 1454323002: Display skips swapping if overlays draw the damage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try skipping the swap at the cc::Display level Created 5 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
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/output/renderer.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_ 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_
6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ~OutputSurface() override; 61 ~OutputSurface() override;
62 62
63 struct Capabilities { 63 struct Capabilities {
64 Capabilities() 64 Capabilities()
65 : delegated_rendering(false), 65 : delegated_rendering(false),
66 max_frames_pending(1), 66 max_frames_pending(1),
67 adjust_deadline_for_parent(true), 67 adjust_deadline_for_parent(true),
68 uses_default_gl_framebuffer(true), 68 uses_default_gl_framebuffer(true),
69 flipped_output_surface(false), 69 flipped_output_surface(false),
70 can_force_reclaim_resources(false), 70 can_force_reclaim_resources(false),
71 delegated_sync_points_required(true) {} 71 delegated_sync_points_required(true),
72 schedules_overlays_without_swap(false) {}
72 bool delegated_rendering; 73 bool delegated_rendering;
73 int max_frames_pending; 74 int max_frames_pending;
74 // This doesn't handle the <webview> case, but once BeginFrame is 75 // This doesn't handle the <webview> case, but once BeginFrame is
75 // supported natively, we shouldn't need adjust_deadline_for_parent. 76 // supported natively, we shouldn't need adjust_deadline_for_parent.
76 bool adjust_deadline_for_parent; 77 bool adjust_deadline_for_parent;
77 // Whether this output surface renders to the default OpenGL zero 78 // Whether this output surface renders to the default OpenGL zero
78 // framebuffer or to an offscreen framebuffer. 79 // framebuffer or to an offscreen framebuffer.
79 bool uses_default_gl_framebuffer; 80 bool uses_default_gl_framebuffer;
80 // Whether this OutputSurface is flipped or not. 81 // Whether this OutputSurface is flipped or not.
81 bool flipped_output_surface; 82 bool flipped_output_surface;
82 // Whether ForceReclaimResources can be called to reclaim all resources 83 // Whether ForceReclaimResources can be called to reclaim all resources
83 // from the OutputSurface. 84 // from the OutputSurface.
84 bool can_force_reclaim_resources; 85 bool can_force_reclaim_resources;
85 // True if sync points for resources are needed when swapping delegated 86 // True if sync points for resources are needed when swapping delegated
86 // frames. 87 // frames.
87 bool delegated_sync_points_required; 88 bool delegated_sync_points_required;
89 // Whether the surface will display overlay planes as soon as they're
90 // scheduled rather than on the next swap.
91 bool schedules_overlays_without_swap;
88 }; 92 };
89 93
90 const Capabilities& capabilities() const { 94 const Capabilities& capabilities() const {
91 return capabilities_; 95 return capabilities_;
92 } 96 }
93 97
94 virtual bool HasExternalStencilTest() const; 98 virtual bool HasExternalStencilTest() const;
95 99
96 // Obtain the 3d context or the software device associated with this output 100 // Obtain the 3d context or the software device associated with this output
97 // surface. Either of these may return a null pointer, but not both. 101 // surface. Either of these may return a null pointer, but not both.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 bool external_stencil_test_enabled_; 207 bool external_stencil_test_enabled_;
204 208
205 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; 209 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
206 210
207 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 211 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
208 }; 212 };
209 213
210 } // namespace cc 214 } // namespace cc
211 215
212 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 216 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/output/renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698