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

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

Issue 11194042: Implement TextureImageTransportSurface using texture mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 66964c9133ebed3c81bb0c589a7da259f9589e70..50d2479e505dc4be37d1dbba206e58ff888955f2 100644
--- a/content/common/gpu/texture_image_transport_surface.h
+++ b/content/common/gpu/texture_image_transport_surface.h
@@ -9,6 +9,7 @@
#include "base/memory/weak_ptr.h"
#include "content/common/gpu/gpu_command_buffer_stub.h"
#include "content/common/gpu/image_transport_surface.h"
+#include "gpu/command_buffer/service/mailbox_manager.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "ui/gl/gl_surface.h"
@@ -58,13 +59,13 @@ class TextureImageTransportSurface :
virtual void OnWillDestroyStub(GpuCommandBufferStub* stub) OVERRIDE;
private:
- // A texture backing the front/back buffer in the parent stub.
+ // A texture backing the front/back buffer.
struct Texture {
Texture();
~Texture();
- // The client-side id in the parent stub.
- uint32 client_id;
+ // The identifier for the client.
+ uint32 identifier;
// The currently allocated size.
gfx::Size size;
@@ -72,19 +73,24 @@ class TextureImageTransportSurface :
// Whether or not that texture has been sent to the client yet.
bool sent_to_client;
- // The texture info in the parent stub.
- gpu::gles2::TextureManager::TextureInfo::Ref info;
+ // The actual GL texture id.
+ uint32 service_id;
+
+ // The mailbox name for this texture.
+ gpu::gles2::MailboxName mailbox_name;
};
virtual ~TextureImageTransportSurface();
void CreateBackTexture(const gfx::Size& size);
void AttachBackTextureToFBO();
void ReleaseTexture(int id);
- void ReleaseParentStub();
void AdjustFrontBufferAllocation();
void BufferPresentedImpl();
int front() const { return front_; }
int back() const { return 1 - front_; }
+ uint32 GenerateId();
+ void ProduceTexture(Texture& texture);
+ void ConsumeTexture(Texture& texture);
// The framebuffer that represents this surface (service id). Allocated lazily
// in OnMakeCurrent.
@@ -109,7 +115,6 @@ class TextureImageTransportSurface :
scoped_ptr<ImageTransportHelper> helper_;
gfx::GLSurfaceHandle handle_;
- GpuCommandBufferStub* parent_stub_;
// The offscreen surface used to make the context current. However note that
// the actual rendering is always redirected to an FBO.

Powered by Google App Engine
This is Rietveld 408576698