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

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 cleanup Created 8 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: 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 5fcd5d30b3d16d9a2703f67edcf02b98931f0f3f..02e505910a66669def88abd29faf566570e36229 100644
--- a/content/common/gpu/texture_image_transport_surface.h
+++ b/content/common/gpu/texture_image_transport_surface.h
@@ -36,7 +36,8 @@ class TextureImageTransportSurface :
virtual unsigned int GetBackingFrameBufferObject() OVERRIDE;
virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE;
- virtual void SetBufferAllocation(BufferAllocationState state) OVERRIDE;
+ virtual void SetBackbufferAllocation(bool allocated) OVERRIDE;
+ virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE;
virtual void* GetShareHandle() OVERRIDE;
virtual void* GetDisplay() OVERRIDE;
virtual void* GetConfig() OVERRIDE;
@@ -45,6 +46,7 @@ class TextureImageTransportSurface :
// ImageTransportSurface implementation.
virtual void OnNewSurfaceACK(
uint64 surface_handle, TransportDIB::Handle shm_handle) OVERRIDE;
+ virtual void OnReleaseSurfaceACK(uint64 surface_id, bool success) OVERRIDE;
virtual void OnBuffersSwappedACK() OVERRIDE;
virtual void OnPostSubBufferACK() OVERRIDE;
virtual void OnResizeViewACK() OVERRIDE;
@@ -69,10 +71,12 @@ class TextureImageTransportSurface :
};
virtual ~TextureImageTransportSurface();
- void CreateBackTexture(const gfx::Size& size);
- void ReleaseBackTexture();
- void AttachBackTextureToFBO();
+ void CreateTexture(int id, const gfx::Size& size);
+ void RequestReleaseTexture(int id);
+ void ReleaseTexture(int id);
+ void AttachTextureToFBO(int id);
gpu::gles2::TextureManager::TextureInfo* GetParentInfo(uint32 client_id);
+ int front() const { return front_; }
int back() const { return 1 - front_; }
// The framebuffer that represents this surface (service id). Allocated lazily
@@ -90,6 +94,9 @@ class TextureImageTransportSurface :
// Whether or not the command buffer stub has been destroyed.
bool stub_destroyed_;
+ bool backbuffer_allocated_;
+ bool frontbuffer_allocated_;
+
scoped_ptr<ImageTransportHelper> helper_;
base::WeakPtr<GpuCommandBufferStub> parent_stub_;

Powered by Google App Engine
This is Rietveld 408576698