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

Unified Diff: android_webview/browser/hardware_renderer.h

Issue 273703008: aw: Refactor hardware init (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more refactoring 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/hardware_renderer.h
diff --git a/android_webview/browser/hardware_renderer.h b/android_webview/browser/hardware_renderer.h
index b290058eff410ebd136ce9dc871ab20f6f341bdf..169bbd3a5ce425fb397a4198fab3b4ec01aca39d 100644
--- a/android_webview/browser/hardware_renderer.h
+++ b/android_webview/browser/hardware_renderer.h
@@ -7,7 +7,6 @@
#include <queue>
-#include "android_webview/browser/gl_view_renderer_manager.h"
#include "android_webview/browser/shared_renderer_state.h"
#include "base/lazy_instance.h"
#include "base/memory/ref_counted.h"
@@ -29,7 +28,10 @@ class HardwareRenderer {
explicit HardwareRenderer(SharedRendererState* state);
~HardwareRenderer();
- bool DrawGL(AwDrawGLInfo* draw_info, DrawGLResult* result);
+ bool DrawGL(bool stencil_enabled,
+ int framebuffer_binding_ext,
+ AwDrawGLInfo* draw_info,
+ DrawGLResult* result);
private:
friend class internal::DeferredGpuCommandService;
@@ -43,60 +45,9 @@ class HardwareRenderer {
scoped_refptr<AwGLSurface> gl_surface_;
- GLViewRendererManager::Key renderer_manager_key_;
-
DISALLOW_COPY_AND_ASSIGN(HardwareRenderer);
};
-namespace internal {
-
-class ScopedAllowGL {
- public:
- ScopedAllowGL();
- ~ScopedAllowGL();
-
- static bool IsAllowed();
-
- private:
- static base::LazyInstance<base::ThreadLocalBoolean> allow_gl;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedAllowGL);
-};
-
-// TODO(boliu): Teach this class about RT.
-class DeferredGpuCommandService
- : public gpu::InProcessCommandBuffer::Service,
- public base::RefCountedThreadSafe<DeferredGpuCommandService> {
- public:
- DeferredGpuCommandService();
-
- virtual void ScheduleTask(const base::Closure& task) OVERRIDE;
- virtual void ScheduleIdleWork(const base::Closure& task) OVERRIDE;
- virtual bool UseVirtualizedGLContexts() OVERRIDE;
- virtual scoped_refptr<gpu::gles2::ShaderTranslatorCache>
- shader_translator_cache() OVERRIDE;
-
- void RunTasks();
-
- virtual void AddRef() const OVERRIDE;
- virtual void Release() const OVERRIDE;
-
- protected:
- virtual ~DeferredGpuCommandService();
- friend class base::RefCountedThreadSafe<DeferredGpuCommandService>;
-
- private:
- static void RequestProcessGLOnUIThread();
-
- base::Lock tasks_lock_;
- std::queue<base::Closure> tasks_;
-
- scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
- DISALLOW_COPY_AND_ASSIGN(DeferredGpuCommandService);
-};
-
-} // namespace internal
-
} // namespace android_webview
#endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_

Powered by Google App Engine
This is Rietveld 408576698