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

Side by Side Diff: ui/accelerated_widget_mac/io_surface_layer.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 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 | « sync/engine/sync_scheduler_impl.h ('k') | ui/app_list/search_controller.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 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 #ifndef UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_LAYER_H_ 5 #ifndef UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_LAYER_H_
6 #define UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_LAYER_H_ 6 #define UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_LAYER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // new content to draw. 102 // new content to draw.
103 uint64 did_not_draw_counter_; 103 uint64 did_not_draw_counter_;
104 104
105 // Set when inside a BeginPumpingFrames/EndPumpingFrames block. 105 // Set when inside a BeginPumpingFrames/EndPumpingFrames block.
106 bool is_pumping_frames_; 106 bool is_pumping_frames_;
107 107
108 // The browser places back-pressure on the GPU by not acknowledging swap 108 // The browser places back-pressure on the GPU by not acknowledging swap
109 // calls until they appear on the screen. This can lead to hangs if the 109 // calls until they appear on the screen. This can lead to hangs if the
110 // view is moved offscreen (among other things). Prevent hangs by always 110 // view is moved offscreen (among other things). Prevent hangs by always
111 // acknowledging the frame after timeout of 1/6th of a second has passed. 111 // acknowledging the frame after timeout of 1/6th of a second has passed.
112 base::DelayTimer<IOSurfaceLayerHelper> timer_; 112 base::DelayTimer timer_;
113 }; 113 };
114 114
115 } // namespace ui 115 } // namespace ui
116 116
117 // The CoreAnimation layer for drawing accelerated content. 117 // The CoreAnimation layer for drawing accelerated content.
118 @interface IOSurfaceLayer : CAOpenGLLayer { 118 @interface IOSurfaceLayer : CAOpenGLLayer {
119 @private 119 @private
120 scoped_refptr<ui::IOSurfaceTexture> iosurface_; 120 scoped_refptr<ui::IOSurfaceTexture> iosurface_;
121 scoped_refptr<ui::IOSurfaceContext> context_; 121 scoped_refptr<ui::IOSurfaceContext> context_;
122 122
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Force a draw immediately, but only if one was requested. 154 // Force a draw immediately, but only if one was requested.
155 - (void)displayIfNeededAndAck; 155 - (void)displayIfNeededAndAck;
156 156
157 // Mark a bracket in which new frames are being pumped in a restricted nested 157 // Mark a bracket in which new frames are being pumped in a restricted nested
158 // run loop. 158 // run loop.
159 - (void)beginPumpingFrames; 159 - (void)beginPumpingFrames;
160 - (void)endPumpingFrames; 160 - (void)endPumpingFrames;
161 @end 161 @end
162 162
163 #endif // UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_LAYER_H_ 163 #endif // UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_LAYER_H_
OLDNEW
« no previous file with comments | « sync/engine/sync_scheduler_impl.h ('k') | ui/app_list/search_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698