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

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

Issue 10537028: aura: Drop unnecessary composites (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More conservative culling of scheduleComposite(). Created 8 years, 6 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
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_COMPOSITOR_COMPOSITOR_H_ 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_
6 #define UI_COMPOSITOR_COMPOSITOR_H_ 6 #define UI_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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 virtual void updateAnimations(double frameBeginTime); 207 virtual void updateAnimations(double frameBeginTime);
208 virtual void layout(); 208 virtual void layout();
209 virtual void applyScrollAndScale(const WebKit::WebSize& scrollDelta, 209 virtual void applyScrollAndScale(const WebKit::WebSize& scrollDelta,
210 float scaleFactor); 210 float scaleFactor);
211 virtual WebKit::WebGraphicsContext3D* createContext3D(); 211 virtual WebKit::WebGraphicsContext3D* createContext3D();
212 virtual void didRebindGraphicsContext(bool success); 212 virtual void didRebindGraphicsContext(bool success);
213 virtual void didCommitAndDrawFrame(); 213 virtual void didCommitAndDrawFrame();
214 virtual void didCompleteSwapBuffers(); 214 virtual void didCompleteSwapBuffers();
215 virtual void scheduleComposite(); 215 virtual void scheduleComposite();
216 216
217 int last_started_frame() { return last_started_frame_; }
218 int last_ended_frame() { return last_ended_frame_; }
219
217 private: 220 private:
218 friend class base::RefCounted<Compositor>; 221 friend class base::RefCounted<Compositor>;
219 222
220 // When reading back pixel data we often get RGBA rather than BGRA pixels and 223 // When reading back pixel data we often get RGBA rather than BGRA pixels and
221 // and the image often needs to be flipped vertically. 224 // and the image often needs to be flipped vertically.
222 static void SwizzleRGBAToBGRAAndFlip(unsigned char* pixels, 225 static void SwizzleRGBAToBGRAAndFlip(unsigned char* pixels,
223 const gfx::Size& image_size); 226 const gfx::Size& image_size);
224 227
225 // Notifies the compositor that compositing is complete. 228 // Notifies the compositor that compositing is complete.
226 void NotifyEnd(); 229 void NotifyEnd();
(...skipping 10 matching lines...) Expand all
237 WebKit::WebLayer root_web_layer_; 240 WebKit::WebLayer root_web_layer_;
238 WebKit::WebLayerTreeView host_; 241 WebKit::WebLayerTreeView host_;
239 242
240 // This is set to true when the swap buffers has been posted and we're waiting 243 // This is set to true when the swap buffers has been posted and we're waiting
241 // for completion. 244 // for completion.
242 bool swap_posted_; 245 bool swap_posted_;
243 246
244 // The device scale factor of the monitor that this compositor is compositing 247 // The device scale factor of the monitor that this compositor is compositing
245 // layers on. 248 // layers on.
246 float device_scale_factor_; 249 float device_scale_factor_;
250
251 int last_started_frame_;
252 int last_ended_frame_;
253
254 bool disable_schedule_composite_;
247 }; 255 };
248 256
249 } // namespace ui 257 } // namespace ui
250 258
251 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 259 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/compositor/compositor.cc » ('j') | ui/compositor/compositor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698