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

Side by Side Diff: android_webview/browser/gl_view_renderer_manager.h

Issue 288983007: aw: Fix hardware init/tear down in pop up flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fix Created 6 years, 7 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 | « no previous file | android_webview/browser/gl_view_renderer_manager.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 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 ANDROID_WEBVIEW_BROWSER_GL_VIEW_RENDERER_MANAGER_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_GL_VIEW_RENDERER_MANAGER_H_
6 #define ANDROID_WEBVIEW_BROWSER_GL_VIEW_RENDERER_MANAGER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_GL_VIEW_RENDERER_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 10 matching lines...) Expand all
21 typedef SharedRendererState* RendererType; 21 typedef SharedRendererState* RendererType;
22 22
23 private: 23 private:
24 typedef std::list<RendererType> ListType; 24 typedef std::list<RendererType> ListType;
25 25
26 public: 26 public:
27 typedef ListType::iterator Key; 27 typedef ListType::iterator Key;
28 28
29 static GLViewRendererManager* GetInstance(); 29 static GLViewRendererManager* GetInstance();
30 30
31 Key NullKey() { 31 Key NullKey();
32 return mru_list_.end();
33 }
34 32
35 Key PushBack(RendererType view); 33 Key PushBack(RendererType view);
36 34
37 // |key| must be already in manager. Move renderer corresponding to |key| to 35 // |key| must be already in manager. Move renderer corresponding to |key| to
38 // most recent. 36 // most recent.
39 void DidDrawGL(Key key); 37 void DidDrawGL(Key key);
40 38
41 void Remove(Key key); 39 void Remove(Key key);
42 40
43 RendererType GetMostRecentlyDrawn() const; 41 RendererType GetMostRecentlyDrawn() const;
44 42
45 private: 43 private:
46 friend struct base::DefaultLazyInstanceTraits<GLViewRendererManager>; 44 friend struct base::DefaultLazyInstanceTraits<GLViewRendererManager>;
47 45
48 GLViewRendererManager(); 46 GLViewRendererManager();
49 ~GLViewRendererManager(); 47 ~GLViewRendererManager();
50 48
51 mutable base::Lock lock_; 49 mutable base::Lock lock_;
52 ListType mru_list_; 50 ListType mru_list_;
53 51
54 DISALLOW_COPY_AND_ASSIGN(GLViewRendererManager); 52 DISALLOW_COPY_AND_ASSIGN(GLViewRendererManager);
55 }; 53 };
56 54
57 } // namespace android_webview 55 } // namespace android_webview
58 56
59 #endif // ANDROID_WEBVIEW_BROWSER_GL_VIEW_RENDERER_MANAGER_H_ 57 #endif // ANDROID_WEBVIEW_BROWSER_GL_VIEW_RENDERER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/gl_view_renderer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698