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

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: add new GLImageBindTest unittests. add R_8 test. give up dynamic way 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 bool IsSupported() { return true; }
55 }; 57 };
56 58
57 using GLImageTestTypes = testing::Types< 59 using GLImageTestTypes = testing::Types<
58 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::RGBA_8888>, 60 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::RGBA_8888>,
59 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::BGRA_8888>, 61 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::BGRA_8888>,
60 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::YUV_420_BIPLANAR>>; 62 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::YUV_420_BIPLANAR>>;
61 63
62 INSTANTIATE_TYPED_TEST_CASE_P(GLImageIOSurface, GLImageTest, GLImageTestTypes); 64 INSTANTIATE_TYPED_TEST_CASE_P(GLImageIOSurface, GLImageTest, GLImageTestTypes);
63 65
64 using GLImageIOSurfaceTestTypes = 66 using GLImageIOSurfaceTestTypes =
65 testing::Types<GLImageIOSurfaceTestDelegate<gfx::BufferFormat::RGBA_8888>, 67 testing::Types<GLImageIOSurfaceTestDelegate<gfx::BufferFormat::RGBA_8888>,
66 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::BGRA_8888>>; 68 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::BGRA_8888>>;
67 69
68 INSTANTIATE_TYPED_TEST_CASE_P(GLImageIOSurface, 70 INSTANTIATE_TYPED_TEST_CASE_P(GLImageIOSurface,
69 GLImageZeroInitializeTest, 71 GLImageZeroInitializeTest,
70 GLImageIOSurfaceTestTypes); 72 GLImageIOSurfaceTestTypes);
71 73
72 INSTANTIATE_TYPED_TEST_CASE_P( 74 INSTANTIATE_TYPED_TEST_CASE_P(
73 GLImageIOSurface, 75 GLImageIOSurface,
74 GLImageCopyTest, 76 GLImageCopyTest,
75 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::YUV_420_BIPLANAR>); 77 GLImageIOSurfaceTestDelegate<gfx::BufferFormat::YUV_420_BIPLANAR>);
76 78
77 } // namespace 79 } // namespace
78 } // namespace gl 80 } // 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