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

Unified Diff: android_webview/browser/shared_renderer_state.h

Issue 255023004: Add synchronous requestDrawGL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/shared_renderer_state.h
diff --git a/android_webview/browser/shared_renderer_state.h b/android_webview/browser/shared_renderer_state.h
index ec21663f203a160c4feaf7881dc488aa78ba1d36..c2c1eee864b0d8025c65ad819a54823138f52a84 100644
--- a/android_webview/browser/shared_renderer_state.h
+++ b/android_webview/browser/shared_renderer_state.h
@@ -5,6 +5,9 @@
#ifndef ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_
#define ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_
+#include <queue>
+
+#include "base/callback.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/synchronization/lock.h"
#include "content/public/browser/android/synchronous_compositor.h"
@@ -55,6 +58,14 @@ class SharedRendererState {
void SetDrawGLInput(const DrawGLInput& input);
DrawGLInput GetDrawGLInput() const;
+ void ClearClosureQueue();
+ void AppendClosure(const base::Closure& closure);
+ // Will return empty closure if queue empty.
+ base::Closure PopFrontClosure();
+
+ void SetHardwareInitialized(bool initialized);
+ bool IsHardwareInitialized() const;
+
private:
void ClientRequestDrawGLOnUIThread();
@@ -68,6 +79,8 @@ class SharedRendererState {
mutable base::Lock lock_;
content::SynchronousCompositor* compositor_;
DrawGLInput draw_gl_input_;
+ std::queue<base::Closure> closure_queue_;
+ bool hardware_initialized_;
};
} // namespace android_webview
« no previous file with comments | « android_webview/browser/browser_view_renderer_client.h ('k') | android_webview/browser/shared_renderer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698