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

Unified Diff: components/viz/display_compositor/yuv_readback_unittest.cc

Issue 2873243002: Move components/display_compositor to components/viz/display_compositor (Closed)
Patch Set: Rebase Created 3 years, 7 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 | « components/viz/display_compositor/run_all_unittests.cc ('k') | components/viz/frame_sinks/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/viz/display_compositor/yuv_readback_unittest.cc
diff --git a/components/display_compositor/yuv_readback_unittest.cc b/components/viz/display_compositor/yuv_readback_unittest.cc
similarity index 97%
rename from components/display_compositor/yuv_readback_unittest.cc
rename to components/viz/display_compositor/yuv_readback_unittest.cc
index bda67318c2502449d25d9931a49acc8debfbd7e3..ef6d83bd75830801c3f98a674ee2eb64dd86f42f 100644
--- a/components/display_compositor/yuv_readback_unittest.cc
+++ b/components/viz/display_compositor/yuv_readback_unittest.cc
@@ -11,7 +11,7 @@
#include "base/test/test_suite.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
-#include "components/display_compositor/gl_helper.h"
+#include "components/viz/display_compositor/gl_helper.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
#include "gpu/command_buffer/client/shared_memory_limits.h"
#include "gpu/ipc/common/surface_handle.h"
@@ -22,7 +22,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gl/gl_implementation.h"
-namespace display_compositor {
+namespace viz {
namespace {
int kYUVReadbackSizes[] = {2, 4, 14};
@@ -55,7 +55,7 @@ class YUVReadbackTest : public testing::Test {
gl_ = context_->GetImplementation();
gpu::ContextSupport* support = context_->GetImplementation();
- helper_.reset(new display_compositor::GLHelper(gl_, support));
+ helper_.reset(new GLHelper(gl_, support));
}
void TearDown() override {
@@ -284,8 +284,8 @@ class YUVReadbackTest : public testing::Test {
for (int y = 0; y < ysize; y++) {
int a = other[y * other_stride + x];
int b = truth[y * truth_stride + x];
- EXPECT_NEAR(a, b, maxdiff) << " x=" << x << " y=" << y << " "
- << message;
+ EXPECT_NEAR(a, b, maxdiff)
+ << " x=" << x << " y=" << y << " " << message;
if (std::abs(a - b) > maxdiff) {
LOG(ERROR) << "-------expected--------";
PrintPlane(truth, xsize, truth_stride, ysize);
@@ -317,7 +317,7 @@ class YUVReadbackTest : public testing::Test {
int test_pattern,
bool flip,
bool use_mrt,
- display_compositor::GLHelper::ScalerQuality quality) {
+ GLHelper::ScalerQuality quality) {
GLuint src_texture;
gl_->GenTextures(1, &src_texture);
SkBitmap input_pixels;
@@ -475,7 +475,7 @@ class YUVReadbackTest : public testing::Test {
std::unique_ptr<gpu::GLInProcessContext> context_;
gpu::gles2::GLES2Interface* gl_;
- std::unique_ptr<display_compositor::GLHelper> helper_;
+ std::unique_ptr<GLHelper> helper_;
gl::DisableNullDrawGLBindings enable_pixel_output_;
base::test::ScopedTaskEnvironment scoped_task_environment_;
};
@@ -487,7 +487,7 @@ TEST_F(YUVReadbackTest, YUVReadbackOptTest) {
"gpu.service") "," TRACE_DISABLED_BY_DEFAULT("gpu_decoder"));
TestYUVReadback(800, 400, 800, 400, 0, 0, 1, false, true,
- display_compositor::GLHelper::SCALER_QUALITY_FAST);
+ GLHelper::SCALER_QUALITY_FAST);
std::map<std::string, int> event_counts;
EndTracing(&event_counts);
@@ -534,8 +534,7 @@ TEST_P(YUVReadbackPixelTest, Test) {
kYUVReadbackSizes[ox], kYUVReadbackSizes[oy],
compute_margin(kYUVReadbackSizes[x], kYUVReadbackSizes[ox], xm),
compute_margin(kYUVReadbackSizes[y], kYUVReadbackSizes[oy], ym),
- pattern, flip, use_mrt,
- display_compositor::GLHelper::SCALER_QUALITY_GOOD);
+ pattern, flip, use_mrt, GLHelper::SCALER_QUALITY_GOOD);
if (HasFailure()) {
return;
}
@@ -556,4 +555,4 @@ INSTANTIATE_TEST_CASE_P(
::testing::Range<unsigned int>(0, arraysize(kYUVReadbackSizes)),
::testing::Range<unsigned int>(0, arraysize(kYUVReadbackSizes))));
-} // namespace display_compositor
+} // namespace viz
« no previous file with comments | « components/viz/display_compositor/run_all_unittests.cc ('k') | components/viz/frame_sinks/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698