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

Unified Diff: content/browser/android/synchronous_compositor_host.h

Issue 1541203003: IPC-based sync compositor software draw optimization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bring back zero-ing Created 5 years 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: content/browser/android/synchronous_compositor_host.h
diff --git a/content/browser/android/synchronous_compositor_host.h b/content/browser/android/synchronous_compositor_host.h
index d2001b1a61802b362cc282996370fe3d96a01bfc..2deb298a649dab04dc3f3e929faa34ae5b2787c2 100644
--- a/content/browser/android/synchronous_compositor_host.h
+++ b/content/browser/android/synchronous_compositor_host.h
@@ -53,7 +53,11 @@ class SynchronousCompositorHost : public SynchronousCompositorBase {
void DidBecomeCurrent() override;
private:
+ class ScopedSendZeroMemory;
+ struct SharedMemoryWithSize;
+ friend class ScopedSetZeroMemory;
friend class SynchronousCompositorBase;
+
SynchronousCompositorHost(RenderWidgetHostViewAndroid* rwhva,
SynchronousCompositorClient* client);
void PopulateCommonParams(SyncCompositorCommonBrowserParams* params);
@@ -64,6 +68,8 @@ class SynchronousCompositorHost : public SynchronousCompositorBase {
const DidOverscrollParams& over_scroll_params);
void SendAsyncCompositorStateIfNeeded();
void UpdateStateTask();
+ void SetSoftwareDrawSharedMemoryIfNeeded(size_t stride, size_t buffer_size);
+ void SendZeroMemory();
RenderWidgetHostViewAndroid* const rwhva_;
SynchronousCompositorClient* const client_;
@@ -74,6 +80,7 @@ class SynchronousCompositorHost : public SynchronousCompositorBase {
bool is_active_;
size_t bytes_limit_;
cc::ReturnedResourceArray returned_resources_;
+ scoped_ptr<SharedMemoryWithSize> software_draw_shm_;
// Updated by both renderer and browser.
gfx::ScrollOffset root_scroll_offset_;

Powered by Google App Engine
This is Rietveld 408576698