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

Unified Diff: android_webview/browser/shared_renderer_state.h

Issue 266353003: aw: Ubercomp mega patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/shared_renderer_state.h
diff --git a/android_webview/browser/shared_renderer_state.h b/android_webview/browser/shared_renderer_state.h
index 9c90731d7ad33f99baa1a13978ca169dba518177..0ee4a6174de8c3577f74bdb57c6b5f0e9aafb596 100644
--- a/android_webview/browser/shared_renderer_state.h
+++ b/android_webview/browser/shared_renderer_state.h
@@ -10,10 +10,16 @@
#include "base/callback.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/synchronization/lock.h"
+#include "cc/output/compositor_frame.h"
+#include "cc/output/compositor_frame_ack.h"
#include "content/public/browser/android/synchronous_compositor.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/vector2d.h"
+namespace cc {
+class CompositorFrameAck;
+}
+
namespace android_webview {
class BrowserViewRendererClient;
@@ -25,8 +31,10 @@ struct DrawGLInput {
gfx::Vector2d scroll_offset;
int width;
int height;
+ cc::CompositorFrame frame;
DrawGLInput();
+ ~DrawGLInput();
};
// Set by HardwareRenderer and read by BrowserViewRenderer.
@@ -35,6 +43,7 @@ struct DrawGLResult {
bool clip_contains_visible_rect;
DrawGLResult();
+ ~DrawGLResult();
};
// This class holds renderer state that is shared between UI and RT threads.
@@ -61,8 +70,8 @@ class SharedRendererState {
void SetMemoryPolicyDirty(bool is_dirty);
bool IsMemoryPolicyDirty() const;
- void SetDrawGLInput(const DrawGLInput& input);
- DrawGLInput GetDrawGLInput() const;
+ scoped_ptr<DrawGLInput> SetDrawGLInput(scoped_ptr<DrawGLInput> input);
+ scoped_ptr<DrawGLInput> PassDrawGLInput();
void ClearClosureQueue();
void AppendClosure(const base::Closure& closure);
@@ -72,6 +81,12 @@ class SharedRendererState {
void SetHardwareInitialized(bool initialized);
bool IsHardwareInitialized() const;
+ // TODO(boliu): Remove this.
+ void ReturnResources(const cc::TransferableResourceArray& input);
+ void InsertReturnedResources(const cc::ReturnedResourceArray& resources);
+ void SwapReturnedResources(cc::ReturnedResourceArray* resources);
+ bool ReturnedResourcesEmpty() const;
+
private:
void ClientRequestDrawGLOnUIThread();
@@ -88,9 +103,10 @@ class SharedRendererState {
// Set to true when SetMemoryPolicy called with a different memory policy.
// Set to false when memory policy is read and enforced to compositor.
bool memory_policy_dirty_;
- DrawGLInput draw_gl_input_;
+ scoped_ptr<DrawGLInput> draw_gl_input_;
std::queue<base::Closure> closure_queue_;
bool hardware_initialized_;
+ cc::ReturnedResourceArray returned_resources_;
};
} // namespace android_webview
« no previous file with comments | « android_webview/browser/scoped_app_gl_state_restore.cc ('k') | android_webview/browser/shared_renderer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698