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

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

Issue 8637014: Plumb thru that we cache the front buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 1 month 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/image_transport_surface_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface_linux.cc
diff --git a/content/common/gpu/image_transport_surface_linux.cc b/content/common/gpu/image_transport_surface_linux.cc
index e106a9ff9b1e084c39bac92e39928d5a9bdd0ea7..10ceae2dca77a8293d7a965747362adb77f1b987 100644
--- a/content/common/gpu/image_transport_surface_linux.cc
+++ b/content/common/gpu/image_transport_surface_linux.cc
@@ -62,7 +62,7 @@ class EGLImageTransportSurface : public ImageTransportSurface,
int32 renderer_id,
int32 command_buffer_id);
- // GLSurface implementation
+ // gfx::GLSurface implementation
virtual bool Initialize() OVERRIDE;
virtual void Destroy() OVERRIDE;
virtual bool IsOffscreen() OVERRIDE;
@@ -115,6 +115,7 @@ class GLXImageTransportSurface : public ImageTransportSurface,
virtual void Destroy() OVERRIDE;
virtual bool SwapBuffers() OVERRIDE;
virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
+ virtual std::string GetExtensions();
virtual gfx::Size GetSize() OVERRIDE;
virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE;
virtual void SetVisible(bool visible) OVERRIDE;
@@ -254,7 +255,7 @@ EGLImageTransportSurface::~EGLImageTransportSurface() {
bool EGLImageTransportSurface::Initialize() {
if (!helper_->Initialize())
return false;
- return PbufferGLSurfaceEGL::Initialize();
+ return gfx::PbufferGLSurfaceEGL::Initialize();
}
void EGLImageTransportSurface::Destroy() {
@@ -264,7 +265,7 @@ void EGLImageTransportSurface::Destroy() {
ReleaseSurface(&front_surface_);
helper_->Destroy();
- PbufferGLSurfaceEGL::Destroy();
+ gfx::PbufferGLSurfaceEGL::Destroy();
}
// Make sure that buffer swaps occur for the surface, so we can send the data
@@ -378,7 +379,10 @@ bool EGLImageTransportSurface::PostSubBuffer(
}
std::string EGLImageTransportSurface::GetExtensions() {
- return GLSurface::GetExtensions();
+ std::string extensions = gfx::GLSurface::GetExtensions();
+ extensions += extensions.empty() ? "" : " ";
+ extensions += "GL_CHROMIUM_front_buffer_cached";
+ return extensions;
}
gfx::Size EGLImageTransportSurface::GetSize() {
@@ -562,6 +566,13 @@ bool GLXImageTransportSurface::PostSubBuffer(
return true;
}
+std::string GLXImageTransportSurface::GetExtensions() {
+ std::string extensions = gfx::NativeViewGLSurfaceGLX::GetExtensions();
+ extensions += extensions.empty() ? "" : " ";
+ extensions += "GL_CHROMIUM_front_buffer_cached";
+ return extensions;
+}
+
gfx::Size GLXImageTransportSurface::GetSize() {
return size_;
}
@@ -708,7 +719,10 @@ bool OSMesaImageTransportSurface::PostSubBuffer(
}
std::string OSMesaImageTransportSurface::GetExtensions() {
- return GLSurface::GetExtensions();
+ std::string extensions = gfx::GLSurface::GetExtensions();
+ extensions += extensions.empty() ? "" : " ";
+ extensions += "GL_CHROMIUM_front_buffer_cached";
+ return extensions;
}
void OSMesaImageTransportSurface::OnBuffersSwappedACK() {
« no previous file with comments | « no previous file | content/common/gpu/image_transport_surface_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698