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

Side by Side Diff: ui/gfx/compositor/compositor.h

Issue 9838045: aura: fast resizes for accelerated pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/root_window.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 UI_GFX_COMPOSITOR_COMPOSITOR_H_ 5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_H_
6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_ 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 // Returns the widget for this compositor. 164 // Returns the widget for this compositor.
165 gfx::AcceleratedWidget widget() const { return widget_; } 165 gfx::AcceleratedWidget widget() const { return widget_; }
166 166
167 // Compositor does not own observers. It is the responsibility of the 167 // Compositor does not own observers. It is the responsibility of the
168 // observer to remove itself when it is done observing. 168 // observer to remove itself when it is done observing.
169 void AddObserver(CompositorObserver* observer); 169 void AddObserver(CompositorObserver* observer);
170 void RemoveObserver(CompositorObserver* observer); 170 void RemoveObserver(CompositorObserver* observer);
171 bool HasObserver(CompositorObserver* observer); 171 bool HasObserver(CompositorObserver* observer);
172 172
173 // Returns whether a draw is pending, that is, if we're between the Draw call
174 // and the OnCompositingEnded.
175 bool DrawPending() const { return swap_posted_; }
176
173 // Internal functions, called back by command-buffer contexts on swap buffer 177 // Internal functions, called back by command-buffer contexts on swap buffer
174 // events. 178 // events.
175 179
176 // Signals swap has been posted. 180 // Signals swap has been posted.
177 void OnSwapBuffersPosted(); 181 void OnSwapBuffersPosted();
178 182
179 // Signals swap has completed. 183 // Signals swap has completed.
180 void OnSwapBuffersComplete(); 184 void OnSwapBuffersComplete();
181 185
182 // Signals swap has aborted (e.g. lost context). 186 // Signals swap has aborted (e.g. lost context).
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // This is set to true when the swap buffers has been posted and we're waiting 221 // This is set to true when the swap buffers has been posted and we're waiting
218 // for completion. 222 // for completion.
219 bool swap_posted_; 223 bool swap_posted_;
220 224
221 friend class base::RefCounted<Compositor>; 225 friend class base::RefCounted<Compositor>;
222 }; 226 };
223 227
224 } // namespace ui 228 } // namespace ui
225 229
226 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ 230 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698