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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest_autogen.h

Issue 169403005: command_buffer: Implement path rendering functions for CHROMIUM_path_rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nv-pr-02-texgen
Patch Set: rebase and cleanup ids Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) { 1916 TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) {
1917 struct Cmds { 1917 struct Cmds {
1918 cmds::MatrixLoadIdentityCHROMIUM cmd; 1918 cmds::MatrixLoadIdentityCHROMIUM cmd;
1919 }; 1919 };
1920 Cmds expected; 1920 Cmds expected;
1921 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); 1921 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM);
1922 1922
1923 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); 1923 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM);
1924 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1924 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1925 } 1925 }
1926 // TODO: Implement unit test for GenPathsCHROMIUM
1927
1928 TEST_F(GLES2ImplementationTest, DeletePathsCHROMIUM) {
1929 struct Cmds {
1930 cmds::DeletePathsCHROMIUM cmd;
1931 };
1932 Cmds expected;
1933 expected.cmd.Init(1, 2);
1934
1935 gl_->DeletePathsCHROMIUM(1, 2);
1936 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1937 }
1938
1939 TEST_F(GLES2ImplementationTest, IsPathCHROMIUM) {
1940 struct Cmds {
1941 cmds::IsPathCHROMIUM cmd;
1942 };
1943
1944 Cmds expected;
1945 ExpectedMemoryInfo result1 =
1946 GetExpectedResultMemory(sizeof(cmds::IsPathCHROMIUM::Result));
1947 expected.cmd.Init(1, result1.id, result1.offset);
1948
1949 EXPECT_CALL(*command_buffer(), OnFlush())
1950 .WillOnce(SetMemory(result1.ptr, uint32_t(1)))
1951 .RetiresOnSaturation();
1952
1953 GLboolean result = gl_->IsPathCHROMIUM(1);
1954 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1955 EXPECT_TRUE(result);
1956 }
1957 // TODO: Implement unit test for PathCommandsCHROMIUM
1958
1959 TEST_F(GLES2ImplementationTest, PathParameterfCHROMIUM) {
1960 struct Cmds {
1961 cmds::PathParameterfCHROMIUM cmd;
1962 };
1963 Cmds expected;
1964 expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
1965
1966 gl_->PathParameterfCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
1967 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1968 }
1969
1970 TEST_F(GLES2ImplementationTest, PathParameteriCHROMIUM) {
1971 struct Cmds {
1972 cmds::PathParameteriCHROMIUM cmd;
1973 };
1974 Cmds expected;
1975 expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
1976
1977 gl_->PathParameteriCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
1978 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1979 }
1980
1981 TEST_F(GLES2ImplementationTest, PathStencilFuncCHROMIUM) {
1982 struct Cmds {
1983 cmds::PathStencilFuncCHROMIUM cmd;
1984 };
1985 Cmds expected;
1986 expected.cmd.Init(GL_NEVER, 2, 3);
1987
1988 gl_->PathStencilFuncCHROMIUM(GL_NEVER, 2, 3);
1989 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1990 }
1991
1992 TEST_F(GLES2ImplementationTest, StencilFillPathCHROMIUM) {
1993 struct Cmds {
1994 cmds::StencilFillPathCHROMIUM cmd;
1995 };
1996 Cmds expected;
1997 expected.cmd.Init(1, GL_INVERT, 3);
1998
1999 gl_->StencilFillPathCHROMIUM(1, GL_INVERT, 3);
2000 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2001 }
2002
2003 TEST_F(GLES2ImplementationTest, StencilStrokePathCHROMIUM) {
2004 struct Cmds {
2005 cmds::StencilStrokePathCHROMIUM cmd;
2006 };
2007 Cmds expected;
2008 expected.cmd.Init(1, 2, 3);
2009
2010 gl_->StencilStrokePathCHROMIUM(1, 2, 3);
2011 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2012 }
2013
2014 TEST_F(GLES2ImplementationTest, CoverFillPathCHROMIUM) {
2015 struct Cmds {
2016 cmds::CoverFillPathCHROMIUM cmd;
2017 };
2018 Cmds expected;
2019 expected.cmd.Init(1);
2020
2021 gl_->CoverFillPathCHROMIUM(1);
2022 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2023 }
2024
2025 TEST_F(GLES2ImplementationTest, CoverStrokePathCHROMIUM) {
2026 struct Cmds {
2027 cmds::CoverStrokePathCHROMIUM cmd;
2028 };
2029 Cmds expected;
2030 expected.cmd.Init(1);
2031
2032 gl_->CoverStrokePathCHROMIUM(1);
2033 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2034 }
2035
2036 TEST_F(GLES2ImplementationTest, StencilThenCoverFillPathCHROMIUM) {
2037 struct Cmds {
2038 cmds::StencilThenCoverFillPathCHROMIUM cmd;
2039 };
2040 Cmds expected;
2041 expected.cmd.Init(1, GL_INVERT, 3);
2042
2043 gl_->StencilThenCoverFillPathCHROMIUM(1, GL_INVERT, 3);
2044 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2045 }
2046
2047 TEST_F(GLES2ImplementationTest, StencilThenCoverStrokePathCHROMIUM) {
2048 struct Cmds {
2049 cmds::StencilThenCoverStrokePathCHROMIUM cmd;
2050 };
2051 Cmds expected;
2052 expected.cmd.Init(1, 2, 3);
2053
2054 gl_->StencilThenCoverStrokePathCHROMIUM(1, 2, 3);
2055 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2056 }
1926 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 2057 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698