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

Side by Side Diff: ui/gl/gl_image_io_surface_unittest.cc

Issue 1484473003: gl, ozone: enable GLImageBindTest unittests Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase based on crrev.com/1879243002 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/gfx/buffer_format_util.h" 9 #include "ui/gfx/buffer_format_util.h"
10 #include "ui/gfx/mac/io_surface.h" 10 #include "ui/gfx/mac/io_surface.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 IOSurfaceUnlock(surface_ref, 0, nullptr); 45 IOSurfaceUnlock(surface_ref, 0, nullptr);
46 46
47 bool rv = 47 bool rv =
48 image->Initialize(surface_ref, gfx::GenericSharedMemoryId(1), format); 48 image->Initialize(surface_ref, gfx::GenericSharedMemoryId(1), format);
49 EXPECT_TRUE(rv); 49 EXPECT_TRUE(rv);
50 50
51 return image; 51 return image;
52 } 52 }
53 53
54 unsigned GetTextureTarget() const { return GL_TEXTURE_RECTANGLE_ARB; } 54 unsigned GetTextureTarget() const { return GL_TEXTURE_RECTANGLE_ARB; }
55
56 gfx::BufferFormat GetBufferFormat() const { return format; }
57
58 bool IsSupported() { return true; }
55 }; 59 };
56 60
57 using GLImageTestTypes = testing::Types< 61 using GLImageTestTypes = testing::Types<
58 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::RGBA_8888>, 62 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::RGBA_8888>,
59 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::BGRA_8888>, 63 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::BGRA_8888>,
60 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::YUV_420_BIPLANAR>>; 64 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::YUV_420_BIPLANAR>>;
61 65
62 INSTANTIATE_TYPED_TEST_CASE_P(GLImageIOSurface, GLImageTest, GLImageTestTypes); 66 INSTANTIATE_TYPED_TEST_CASE_P(GLImageIOSurface, GLImageTest, GLImageTestTypes);
63 67
64 using GLImageRGBTestTypes = 68 using GLImageRGBTestTypes =
65 testing::Types<GLImageIOSurfaceTestDelegate<gfx::BufferFormat::RGBA_8888>, 69 testing::Types<GLImageIOSurfaceTestDelegate<gfx::BufferFormat::RGBA_8888>,
66 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::BGRA_8888>>; 70 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::BGRA_8888>>;
67 71
68 INSTANTIATE_TYPED_TEST_CASE_P(GLImageIOSurface, 72 INSTANTIATE_TYPED_TEST_CASE_P(GLImageIOSurface,
69 GLImageZeroInitializeTest, 73 GLImageZeroInitializeTest,
70 GLImageRGBTestTypes); 74 GLImageRGBTestTypes);
71 75
72 INSTANTIATE_TYPED_TEST_CASE_P( 76 INSTANTIATE_TYPED_TEST_CASE_P(
73 GLImageIOSurface, 77 GLImageIOSurface,
74 GLImageBindTest, 78 GLImageBindTest,
75 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::BGRA_8888>); 79 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::BGRA_8888>);
76 80
77 INSTANTIATE_TYPED_TEST_CASE_P( 81 INSTANTIATE_TYPED_TEST_CASE_P(
78 GLImageIOSurface, 82 GLImageIOSurface,
79 GLImageCopyTest, 83 GLImageCopyTest,
80 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::YUV_420_BIPLANAR>); 84 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::YUV_420_BIPLANAR>);
81 85
82 } // namespace 86 } // namespace
83 } // namespace gl 87 } // namespace gl
OLDNEW
« no previous file with comments | « no previous file | ui/gl/gl_image_ozone_native_pixmap_unittest.cc » ('j') | ui/gl/gl_image_ozone_native_pixmap_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698