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

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

Issue 10984004: Use a singleton 1x1 offscreen surface for all TextureImageTransportSurface instances. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor polish - consistently use the get() accessor. Created 8 years, 3 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/texture_image_transport_surface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/texture_image_transport_surface.cc
diff --git a/content/common/gpu/texture_image_transport_surface.cc b/content/common/gpu/texture_image_transport_surface.cc
index c6d28e09004edc0673978e1aedc434bd9f414c49..86f5ebcdd75617071fba129ca971a942354fb8ac 100644
--- a/content/common/gpu/texture_image_transport_surface.cc
+++ b/content/common/gpu/texture_image_transport_surface.cc
@@ -88,7 +88,7 @@ bool TextureImageTransportSurface::Initialize() {
texture.info, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
}
- surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1));
+ surface_ = manager->GetDefaultOffscreenSurface();
if (!surface_.get())
return false;
@@ -108,10 +108,8 @@ void TextureImageTransportSurface::Destroy() {
ReleaseParentStub();
}
- if (surface_.get()) {
- surface_->Destroy();
+ if (surface_.get())
surface_ = NULL;
- }
helper_->Destroy();
}
@@ -348,7 +346,7 @@ void* TextureImageTransportSurface::GetHandle() {
}
unsigned TextureImageTransportSurface::GetFormat() {
- return surface_ ? surface_->GetFormat() : 0;
+ return surface_.get() ? surface_->GetFormat() : 0;
}
void TextureImageTransportSurface::OnSetFrontSurfaceIsProtected(
« no previous file with comments | « content/common/gpu/texture_image_transport_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698