| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |