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

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

Issue 12717013: Add reference-counting for mailbox textures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add optional 'pool' reference while textures are in mailbox Created 7 years, 9 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
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/common/gpu/texture_image_transport_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 93a54c5d7dfd9a8079b095e3fc6e59a2efd91053..a61649a50a9637e5270f946c9d6f1eef1e547a8d 100644
--- a/content/common/gpu/texture_image_transport_surface.h
+++ b/content/common/gpu/texture_image_transport_surface.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/gpu/gpu_command_buffer_stub.h"
#include "content/common/gpu/image_transport_surface.h"
@@ -23,7 +24,8 @@ class GpuChannelManager;
class TextureImageTransportSurface
: public ImageTransportSurface,
public GpuCommandBufferStub::DestructionObserver,
- public gfx::GLSurface {
+ public gfx::GLSurface,
+ private gpu::gles2::TextureDefinition::Client {
public:
TextureImageTransportSurface(GpuChannelManager* manager,
GpuCommandBufferStub* stub,
@@ -82,7 +84,7 @@ class TextureImageTransportSurface
uint32 fbo_id_;
// The current backbuffer.
- scoped_ptr<gpu::gles2::TextureDefinition> backbuffer_;
+ gpu::gles2::TextureDefinition* backbuffer_;
// The mailbox name for the current backbuffer texture. Needs to be unique per
// GL texture and is invalid while service_id is zero.
@@ -105,9 +107,6 @@ class TextureImageTransportSurface
// the actual rendering is always redirected to an FBO.
scoped_refptr<gfx::GLSurface> surface_;
- // Holds a reference to the underlying context for cleanup.
- scoped_refptr<gfx::GLContext> context_;
-
// Whether a SwapBuffers is pending.
bool is_swap_buffers_pending_;
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/common/gpu/texture_image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698