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

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

Issue 578383004: Limit outstanding surface draw swaps to max_frames_pending. (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 | « no previous file | cc/surfaces/display.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_DISPLAY_H_ 5 #ifndef CC_SURFACES_DISPLAY_H_
6 #define CC_SURFACES_DISPLAY_H_ 6 #define CC_SURFACES_DISPLAY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/output/output_surface_client.h" 9 #include "cc/output/output_surface_client.h"
10 #include "cc/output/renderer.h" 10 #include "cc/output/renderer.h"
(...skipping 29 matching lines...) Expand all
40 public: 40 public:
41 Display(DisplayClient* client, 41 Display(DisplayClient* client,
42 SurfaceManager* manager, 42 SurfaceManager* manager,
43 SharedBitmapManager* bitmap_manager); 43 SharedBitmapManager* bitmap_manager);
44 virtual ~Display(); 44 virtual ~Display();
45 45
46 void Resize(SurfaceId id, const gfx::Size& new_size); 46 void Resize(SurfaceId id, const gfx::Size& new_size);
47 bool Draw(); 47 bool Draw();
48 48
49 SurfaceId CurrentSurfaceId(); 49 SurfaceId CurrentSurfaceId();
50 int GetMaxFramesPending();
50 51
51 // OutputSurfaceClient implementation. 52 // OutputSurfaceClient implementation.
52 virtual void DeferredInitialize() OVERRIDE {} 53 virtual void DeferredInitialize() OVERRIDE {}
53 virtual void ReleaseGL() OVERRIDE {} 54 virtual void ReleaseGL() OVERRIDE {}
54 virtual void CommitVSyncParameters(base::TimeTicks timebase, 55 virtual void CommitVSyncParameters(base::TimeTicks timebase,
55 base::TimeDelta interval) OVERRIDE {} 56 base::TimeDelta interval) OVERRIDE {}
56 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) OVERRIDE {} 57 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) OVERRIDE {}
57 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE {} 58 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE {}
58 virtual void DidSwapBuffers() OVERRIDE {} 59 virtual void DidSwapBuffers() OVERRIDE;
59 virtual void DidSwapBuffersComplete() OVERRIDE {} 60 virtual void DidSwapBuffersComplete() OVERRIDE;
60 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE {} 61 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE {}
61 virtual void DidLoseOutputSurface() OVERRIDE {} 62 virtual void DidLoseOutputSurface() OVERRIDE {}
62 virtual void SetExternalDrawConstraints( 63 virtual void SetExternalDrawConstraints(
63 const gfx::Transform& transform, 64 const gfx::Transform& transform,
64 const gfx::Rect& viewport, 65 const gfx::Rect& viewport,
65 const gfx::Rect& clip, 66 const gfx::Rect& clip,
66 const gfx::Rect& viewport_rect_for_tile_priority, 67 const gfx::Rect& viewport_rect_for_tile_priority,
67 const gfx::Transform& transform_for_tile_priority, 68 const gfx::Transform& transform_for_tile_priority,
68 bool resourceless_software_draw) OVERRIDE {} 69 bool resourceless_software_draw) OVERRIDE {}
69 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE {} 70 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE {}
(...skipping 20 matching lines...) Expand all
90 scoped_ptr<SurfaceAggregator> aggregator_; 91 scoped_ptr<SurfaceAggregator> aggregator_;
91 scoped_ptr<DirectRenderer> renderer_; 92 scoped_ptr<DirectRenderer> renderer_;
92 scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_; 93 scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_;
93 94
94 DISALLOW_COPY_AND_ASSIGN(Display); 95 DISALLOW_COPY_AND_ASSIGN(Display);
95 }; 96 };
96 97
97 } // namespace cc 98 } // namespace cc
98 99
99 #endif // CC_SURFACES_DISPLAY_H_ 100 #endif // CC_SURFACES_DISPLAY_H_
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698