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

Unified Diff: content/common/gpu/client/gl_helper.cc

Issue 10214014: Backport to R19 of r132638 r133017 r133579 r133732 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src
Patch Set: 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
Index: content/common/gpu/client/gl_helper.cc
diff --git a/content/common/gpu/client/gl_helper.cc b/content/common/gpu/client/gl_helper.cc
index 5b88e4ff32b6c14cf7ab31330b887537f7b96f83..9aac7ad84717aa9f2fcfdce9209b602085e05ebd 100644
--- a/content/common/gpu/client/gl_helper.cc
+++ b/content/common/gpu/client/gl_helper.cc
@@ -171,6 +171,22 @@ class ScopedTextureBinder : ScopedBinder<target> {
&WebKit::WebGraphicsContext3D::bindTexture) {}
};
+class ScopedFlush {
+ public:
+ ScopedFlush(WebKit::WebGraphicsContext3D* context)
+ : context_(context) {
+ }
+
+ virtual ~ScopedFlush() {
+ context_->flush();
+ }
+
+ private:
+ WebKit::WebGraphicsContext3D* context_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedFlush);
+};
+
} // namespace
namespace content {
@@ -287,6 +303,7 @@ bool GLHelper::CopyTextureToImpl::CopyTextureTo(WebKit::WebGLId src_texture,
const gfx::Size& src_size,
const gfx::Size& dst_size,
unsigned char* out) {
+ ScopedFlush flush(context_);
ScopedFramebuffer dst_framebuffer(context_, context_->createFramebuffer());
ScopedTexture dst_texture(context_, context_->createTexture());
{
« no previous file with comments | « content/browser/renderer_host/image_transport_factory.cc ('k') | content/common/gpu/texture_image_transport_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698