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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 132233041: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ff7262fa Rebase. Created 6 years, 11 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 | « cc/trees/layer_tree_host_perftest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 8db1faa28a06a2a6829171bce8828dc66fcf97fc..34bc246a8552da5c73bb347d22ed6405236d6335 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -1004,7 +1004,7 @@ class LayerTreeHostContextTestDontUseLostResources
texture->SetAnchorPoint(gfx::PointF());
texture->SetIsDrawable(true);
texture->SetTextureMailbox(
- TextureMailbox(mailbox, sync_point),
+ TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point),
SingleReleaseCallback::Create(
base::Bind(&LayerTreeHostContextTestDontUseLostResources::
EmptyReleaseCallback)));
@@ -1045,30 +1045,24 @@ class LayerTreeHostContextTestDontUseLostResources
color_video_frame_ = VideoFrame::CreateColorFrame(
gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta());
- hw_video_frame_ = VideoFrame::WrapNativeTexture(
- make_scoped_ptr(new VideoFrame::MailboxHolder(
- mailbox,
- sync_point,
- VideoFrame::MailboxHolder::TextureNoLongerNeededCallback())),
- GL_TEXTURE_2D,
- gfx::Size(4, 4),
- gfx::Rect(0, 0, 4, 4),
- gfx::Size(4, 4),
- base::TimeDelta(),
- VideoFrame::ReadPixelsCB(),
- base::Closure());
- scaled_hw_video_frame_ = VideoFrame::WrapNativeTexture(
- make_scoped_ptr(new VideoFrame::MailboxHolder(
- mailbox,
- sync_point,
- VideoFrame::MailboxHolder::TextureNoLongerNeededCallback())),
- GL_TEXTURE_2D,
- gfx::Size(4, 4),
- gfx::Rect(0, 0, 3, 2),
- gfx::Size(4, 4),
- base::TimeDelta(),
- VideoFrame::ReadPixelsCB(),
- base::Closure());
+ hw_video_frame_ =
+ VideoFrame::WrapNativeTexture(make_scoped_ptr(new gpu::MailboxHolder(
+ mailbox, GL_TEXTURE_2D, sync_point)),
+ media::VideoFrame::ReleaseMailboxCB(),
+ gfx::Size(4, 4),
+ gfx::Rect(0, 0, 4, 4),
+ gfx::Size(4, 4),
+ base::TimeDelta(),
+ VideoFrame::ReadPixelsCB());
+ scaled_hw_video_frame_ =
+ VideoFrame::WrapNativeTexture(make_scoped_ptr(new gpu::MailboxHolder(
+ mailbox, GL_TEXTURE_2D, sync_point)),
+ media::VideoFrame::ReleaseMailboxCB(),
+ gfx::Size(4, 4),
+ gfx::Rect(0, 0, 3, 2),
+ gfx::Size(4, 4),
+ base::TimeDelta(),
+ VideoFrame::ReadPixelsCB());
color_frame_provider_.set_frame(color_video_frame_);
hw_frame_provider_.set_frame(hw_video_frame_);
« no previous file with comments | « cc/trees/layer_tree_host_perftest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698