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

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

Issue 22648006: Revert 216780 "Clean up compositor initialization/destruction." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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 | « trunk/src/content/common/gpu/client/gl_helper.h ('k') | trunk/src/content/public/test/browser_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/content/common/gpu/client/gl_helper.cc
===================================================================
--- trunk/src/content/common/gpu/client/gl_helper.cc (revision 216906)
+++ trunk/src/content/common/gpu/client/gl_helper.cc (working copy)
@@ -154,7 +154,7 @@
const base::Callback<void(bool)>& callback);
void ReadbackPlane(TextureFrameBufferPair* source,
- const scoped_refptr<media::VideoFrame>& target,
+ media::VideoFrame* target,
int plane,
int size_shift,
const gfx::Rect& dst_subrect,
@@ -232,7 +232,7 @@
virtual void ReadbackYUV(
const gpu::Mailbox& mailbox,
uint32 sync_point,
- const scoped_refptr<media::VideoFrame>& target,
+ media::VideoFrame* target,
const base::Callback<void(bool)>& callback) OVERRIDE;
virtual ScalerInterface* scaler() OVERRIDE {
@@ -270,7 +270,7 @@
virtual void ReadbackYUV(
const gpu::Mailbox& mailbox,
uint32 sync_point,
- const scoped_refptr<media::VideoFrame>& target,
+ media::VideoFrame* target,
const base::Callback<void(bool)>& callback) OVERRIDE;
virtual ScalerInterface* scaler() OVERRIDE {
@@ -729,7 +729,7 @@
void GLHelper::CopyTextureToImpl::ReadbackPlane(
TextureFrameBufferPair* source,
- const scoped_refptr<media::VideoFrame>& target,
+ media::VideoFrame* target,
int plane,
int size_shift,
const gfx::Rect& dst_subrect,
@@ -813,17 +813,11 @@
DCHECK(!(dst_subrect.y() & 1));
}
-static void CallbackKeepingVideoFrameAlive(
- scoped_refptr<media::VideoFrame> video_frame,
- const base::Callback<void(bool)>& callback,
- bool success) {
- callback.Run(success);
-}
void GLHelper::CopyTextureToImpl::ReadbackYUVImpl::ReadbackYUV(
const gpu::Mailbox& mailbox,
uint32 sync_point,
- const scoped_refptr<media::VideoFrame>& target,
+ media::VideoFrame *target,
const base::Callback<void(bool)>& callback) {
WebGLId mailbox_texture =
copy_impl_->ConsumeMailboxToTexture(mailbox, sync_point);
@@ -844,8 +838,7 @@
return;
}
- // Read back planes, one at a time. Keep the video frame alive while doing the
- // readback.
+ // Read back planes, one at a time.
copy_impl_->ReadbackPlane(y_.texture_and_framebuffer(),
target,
media::VideoFrame::kYPlane,
@@ -863,9 +856,7 @@
media::VideoFrame::kVPlane,
1,
dst_subrect_,
- base::Bind(&CallbackKeepingVideoFrameAlive,
- target,
- callback));
+ callback);
context_->bindFramebuffer(GL_FRAMEBUFFER, 0);
media::LetterboxYUV(target, dst_subrect_);
}
@@ -942,7 +933,7 @@
void GLHelper::CopyTextureToImpl::ReadbackYUV_MRT::ReadbackYUV(
const gpu::Mailbox& mailbox,
uint32 sync_point,
- const scoped_refptr<media::VideoFrame>& target,
+ media::VideoFrame *target,
const base::Callback<void(bool)>& callback) {
WebGLId mailbox_texture =
copy_impl_->ConsumeMailboxToTexture(mailbox, sync_point);
@@ -985,9 +976,7 @@
media::VideoFrame::kVPlane,
1,
dst_subrect_,
- base::Bind(&CallbackKeepingVideoFrameAlive,
- target,
- callback));
+ callback);
context_->bindFramebuffer(GL_FRAMEBUFFER, 0);
media::LetterboxYUV(target, dst_subrect_);
}
Property changes on: trunk/src/content/common/gpu/client/gl_helper.cc
___________________________________________________________________
Deleted: svn:mergeinfo
« no previous file with comments | « trunk/src/content/common/gpu/client/gl_helper.h ('k') | trunk/src/content/public/test/browser_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698