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

Side by Side Diff: cc/surfaces/surface.h

Issue 506273002: Aggregate damage rects in surface aggregator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/display.cc ('k') | cc/surfaces/surface.cc » ('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 #ifndef CC_SURFACES_SURFACE_H_ 5 #ifndef CC_SURFACES_SURFACE_H_
6 #define CC_SURFACES_SURFACE_H_ 6 #define CC_SURFACES_SURFACE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 14 matching lines...) Expand all
25 ~Surface(); 25 ~Surface();
26 26
27 const gfx::Size& size() const { return size_; } 27 const gfx::Size& size() const { return size_; }
28 SurfaceId surface_id() const { return surface_id_; } 28 SurfaceId surface_id() const { return surface_id_; }
29 29
30 void QueueFrame(scoped_ptr<CompositorFrame> frame, 30 void QueueFrame(scoped_ptr<CompositorFrame> frame,
31 const base::Closure& draw_callback); 31 const base::Closure& draw_callback);
32 // Returns the most recent frame that is eligible to be rendered. 32 // Returns the most recent frame that is eligible to be rendered.
33 const CompositorFrame* GetEligibleFrame(); 33 const CompositorFrame* GetEligibleFrame();
34 34
35 // Returns a number that increments by 1 every time a new frame is enqueued.
36 int frame_index() const { return frame_index_; }
37
35 void RunDrawCallbacks(); 38 void RunDrawCallbacks();
36 39
37 SurfaceFactory* factory() { return factory_; } 40 SurfaceFactory* factory() { return factory_; }
38 41
39 private: 42 private:
40 SurfaceId surface_id_; 43 SurfaceId surface_id_;
41 gfx::Size size_; 44 gfx::Size size_;
42 SurfaceFactory* factory_; 45 SurfaceFactory* factory_;
43 // TODO(jamesr): Support multiple frames in flight. 46 // TODO(jamesr): Support multiple frames in flight.
44 scoped_ptr<CompositorFrame> current_frame_; 47 scoped_ptr<CompositorFrame> current_frame_;
48 int frame_index_;
45 49
46 base::Closure draw_callback_; 50 base::Closure draw_callback_;
47 51
48 DISALLOW_COPY_AND_ASSIGN(Surface); 52 DISALLOW_COPY_AND_ASSIGN(Surface);
49 }; 53 };
50 54
51 } // namespace cc 55 } // namespace cc
52 56
53 #endif // CC_SURFACES_SURFACE_H_ 57 #endif // CC_SURFACES_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698