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

Unified Diff: content/browser/compositor/gl_helper_unittest.cc

Issue 1893473002: Decouple GLHelper from media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed content_browsertests Created 4 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/browser/compositor/gl_helper_unittest.cc
diff --git a/content/browser/compositor/gl_helper_unittest.cc b/content/browser/compositor/gl_helper_unittest.cc
index 05f3f6f6c95cb389ace99bd97573b128e1e52e3c..a4234261ace6b760a4256493d859e1cf58c620b5 100644
--- a/content/browser/compositor/gl_helper_unittest.cc
+++ b/content/browser/compositor/gl_helper_unittest.cc
@@ -35,6 +35,7 @@
#include "gpu/command_buffer/client/gl_in_process_context.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
#include "media/base/video_frame.h"
+#include "media/base/video_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkTypes.h"
@@ -1330,9 +1331,19 @@ class GLHelperTest : public testing::Test {
base::TimeDelta::FromSeconds(0));
base::RunLoop run_loop;
- yuv_reader->ReadbackYUV(mailbox, sync_token, output_frame.get(),
+ yuv_reader->ReadbackYUV(mailbox, sync_token, output_frame->visible_rect(),
+ output_frame->stride(media::VideoFrame::kYPlane),
+ output_frame->data(media::VideoFrame::kYPlane),
+ output_frame->stride(media::VideoFrame::kUPlane),
+ output_frame->data(media::VideoFrame::kUPlane),
+ output_frame->stride(media::VideoFrame::kVPlane),
+ output_frame->data(media::VideoFrame::kVPlane),
gfx::Point(xmargin, ymargin),
base::Bind(&callcallback, run_loop.QuitClosure()));
+
+ const gfx::Rect paste_rect(gfx::Point(xmargin, ymargin),
+ gfx::Size(xsize, ysize));
+ media::LetterboxYUV(output_frame.get(), paste_rect);
run_loop.Run();
if (flip) {
« no previous file with comments | « content/browser/compositor/gl_helper.cc ('k') | content/browser/media/capture/aura_window_capture_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698