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

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

Issue 226363004: Global GPU memory manager for android webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 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 ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_
6 #define ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "android_webview/browser/gl_view_renderer_manager.h" 10 #include "android_webview/browser/gl_view_renderer_manager.h"
(...skipping 19 matching lines...) Expand all
30 30
31 static void CalculateTileMemoryPolicy(); 31 static void CalculateTileMemoryPolicy();
32 32
33 bool DrawGL(AwDrawGLInfo* draw_info, DrawGLResult* result); 33 bool DrawGL(AwDrawGLInfo* draw_info, DrawGLResult* result);
34 bool TrimMemory(int level, bool visible); 34 bool TrimMemory(int level, bool visible);
35 35
36 private: 36 private:
37 friend class internal::DeferredGpuCommandService; 37 friend class internal::DeferredGpuCommandService;
38 38
39 void SetMemoryPolicy(content::SynchronousCompositorMemoryPolicy& new_policy); 39 void SetMemoryPolicy(content::SynchronousCompositorMemoryPolicy& new_policy);
40 40 const content::SynchronousCompositorMemoryPolicy& GetMemoryPolicy() const;
41 SharedRendererState* shared_renderer_state_; 41 SharedRendererState* shared_renderer_state_;
42 42
43 typedef void* EGLContext; 43 typedef void* EGLContext;
44 EGLContext last_egl_context_; 44 EGLContext last_egl_context_;
45 45
46 scoped_refptr<AwGLSurface> gl_surface_; 46 scoped_refptr<AwGLSurface> gl_surface_;
47 content::SynchronousCompositorMemoryPolicy memory_policy_; 47 // content::SynchronousCompositorMemoryPolicy memory_policy_;
48 48
49 GLViewRendererManager::Key manager_key_; 49 GLViewRendererManager::Key manager_key_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); 51 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer);
52 }; 52 };
53 53
54 namespace internal { 54 namespace internal {
55 55
56 class ScopedAllowGL { 56 class ScopedAllowGL {
57 public: 57 public:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; 97 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
98 DISALLOW_COPY_AND_ASSIGN(DeferredGpuCommandService); 98 DISALLOW_COPY_AND_ASSIGN(DeferredGpuCommandService);
99 }; 99 };
100 100
101 } // namespace internal 101 } // namespace internal
102 102
103 } // namespace android_webview 103 } // namespace android_webview
104 104
105 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ 105 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698