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

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

Issue 10103021: aura/texture transport: Keep ref to texture infos to avoid races with the UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments 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
« no previous file with comments | « no previous file | 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 5fcd5d30b3d16d9a2703f67edcf02b98931f0f3f..6dc5dd2719681574bdc18c8faa31c4fd8a7c2160 100644
--- a/content/common/gpu/texture_image_transport_surface.h
+++ b/content/common/gpu/texture_image_transport_surface.h
@@ -7,7 +7,6 @@
#pragma once
#include "base/basictypes.h"
-#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/texture_manager.h"
@@ -56,7 +55,8 @@ class TextureImageTransportSurface :
private:
// A texture backing the front/back buffer in the parent stub.
struct Texture {
- Texture() : client_id(0), sent_to_client(false) {}
+ Texture();
+ ~Texture();
// The client-side id in the parent stub.
uint32 client_id;
@@ -66,13 +66,15 @@ 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;
};
virtual ~TextureImageTransportSurface();
void CreateBackTexture(const gfx::Size& size);
void ReleaseBackTexture();
void AttachBackTextureToFBO();
- gpu::gles2::TextureManager::TextureInfo* GetParentInfo(uint32 client_id);
int back() const { return 1 - front_; }
// The framebuffer that represents this surface (service id). Allocated lazily
@@ -91,7 +93,7 @@ class TextureImageTransportSurface :
bool stub_destroyed_;
scoped_ptr<ImageTransportHelper> helper_;
- base::WeakPtr<GpuCommandBufferStub> parent_stub_;
+ GpuCommandBufferStub* parent_stub_;
DISALLOW_COPY_AND_ASSIGN(TextureImageTransportSurface);
};
« no previous file with comments | « no previous file | content/common/gpu/texture_image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698