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

Unified Diff: content/common/gpu/texture_image_transport_surface.h

Issue 10052018: Drop frontbuffers with ui-use-gpu-process, synchronized with browser, decoupled from backbuffer dro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor changes, rebasing with master Created 8 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: content/common/gpu/texture_image_transport_surface.h
diff --git a/content/common/gpu/texture_image_transport_surface.h b/content/common/gpu/texture_image_transport_surface.h
index 394da7515f64440971d8a4d61babae5b5ca5d293..5c60ffc40cb24a57e61ac69773e4f859beca0a86 100644
--- a/content/common/gpu/texture_image_transport_surface.h
+++ b/content/common/gpu/texture_image_transport_surface.h
@@ -19,6 +19,9 @@ class TextureImageTransportSurface :
public GpuCommandBufferStub::DestructionObserver,
public gfx::GLSurface {
public:
+ enum { kMaxRequestReleaseFrontRetries = 10 };
+
+ public:
TextureImageTransportSurface(GpuChannelManager* manager,
GpuCommandBufferStub* stub,
const gfx::GLSurfaceHandle& handle);
@@ -48,6 +51,10 @@ class TextureImageTransportSurface :
virtual void OnBuffersSwappedACK() OVERRIDE;
virtual void OnPostSubBufferACK() OVERRIDE;
virtual void OnResizeViewACK() OVERRIDE;
+ virtual void OnSetFrontSurfaceIsProtected(bool is_protected) OVERRIDE;
+ virtual void OnRequestReleaseFrontACK(int request_id,
+ int retry_count,
+ bool was_released) OVERRIDE;
virtual void OnResize(gfx::Size size) OVERRIDE;
// GpuCommandBufferStub::DestructionObserver implementation.
@@ -74,9 +81,12 @@ class TextureImageTransportSurface :
virtual ~TextureImageTransportSurface();
void CreateBackTexture(const gfx::Size& size);
- void ReleaseBackTexture();
void AttachBackTextureToFBO();
+ void RequestReleaseFrontTexture(int retry_count);
+ void ReleaseTexture(int id);
void ReleaseParentStub();
+ void AdjustFrontBufferAllocation(int retry_count);
+ int front() const { return front_; }
int back() const { return 1 - front_; }
// The framebuffer that represents this surface (service id). Allocated lazily
@@ -97,6 +107,11 @@ class TextureImageTransportSurface :
bool backbuffer_suggested_allocation_;
bool frontbuffer_suggested_allocation_;
+ bool frontbuffer_is_protected_;
+ bool ui_may_not_have_frontbuffer_handle_;
+ int current_valid_release_front_request_id_;
+ int next_unique_release_front_request_id_;
+
scoped_ptr<ImageTransportHelper> helper_;
GpuCommandBufferStub* parent_stub_;

Powered by Google App Engine
This is Rietveld 408576698