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

Side by Side Diff: components/display_compositor/delegated_frame_evictor.h

Issue 2811083002: Move frame eviction into components (Closed)
Patch Set: Created 3 years, 8 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
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 CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_ 5 #ifndef COMPONENTS_DISPLAY_COMPOSITOR_DELEGATED_FRAME_EVICTOR_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_ 6 #define COMPONENTS_DISPLAY_COMPOSITOR_DELEGATED_FRAME_EVICTOR_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/browser/renderer_host/renderer_frame_manager.h" 9 #include "components/display_compositor/display_compositor_export.h"
10 #include "content/common/content_export.h" 10 #include "components/display_compositor/renderer_frame_manager.h"
11 11
12 namespace content { 12 namespace display_compositor {
13 13
14 class CONTENT_EXPORT DelegatedFrameEvictorClient { 14 class DISPLAY_COMPOSITOR_EXPORT DelegatedFrameEvictorClient {
15 public: 15 public:
16 virtual ~DelegatedFrameEvictorClient() {} 16 virtual ~DelegatedFrameEvictorClient() {}
17 virtual void EvictDelegatedFrame() = 0; 17 virtual void EvictDelegatedFrame() = 0;
18 }; 18 };
19 19
20 class CONTENT_EXPORT DelegatedFrameEvictor : public RendererFrameManagerClient { 20 class DISPLAY_COMPOSITOR_EXPORT DelegatedFrameEvictor
Saman Sami 2017/04/11 14:58:24 I would rather Delegated to be removed from the na
xing.xu 2017/04/14 03:01:29 Done.
21 : public RendererFrameManagerClient {
21 public: 22 public:
22 // |client| must outlive |this|. 23 // |client| must outlive |this|.
23 explicit DelegatedFrameEvictor(DelegatedFrameEvictorClient* client); 24 explicit DelegatedFrameEvictor(DelegatedFrameEvictorClient* client);
24 ~DelegatedFrameEvictor() override; 25 ~DelegatedFrameEvictor() override;
25 26
26 void SwappedFrame(bool visible); 27 void SwappedFrame(bool visible);
27 void DiscardedFrame(); 28 void DiscardedFrame();
28 void SetVisible(bool visible); 29 void SetVisible(bool visible);
29 void LockFrame(); 30 void LockFrame();
30 void UnlockFrame(); 31 void UnlockFrame();
31 bool HasFrame() { return has_frame_; } 32 bool HasFrame() { return has_frame_; }
32 33
33 private: 34 private:
34 // RendererFrameManagerClient implementation. 35 // RendererFrameManagerClient implementation.
35 void EvictCurrentFrame() override; 36 void EvictCurrentFrame() override;
36 37
37 DelegatedFrameEvictorClient* client_; 38 DelegatedFrameEvictorClient* client_;
38 bool has_frame_; 39 bool has_frame_;
39 bool visible_; 40 bool visible_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameEvictor); 42 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameEvictor);
42 }; 43 };
43 44
44 } // namespace content 45 } // namespace display_compositor
45 46
46 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_ 47 #endif // COMPONENTS_DISPLAY_COMPOSITOR_DELEGATED_FRAME_EVICTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698