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

Side by Side Diff: gpu/command_buffer/tests/gl_test_utils.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « gpu/command_buffer/tests/gl_test_utils.h ('k') | gpu/command_buffer/tests/gl_tests_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "gpu/command_buffer/tests/gl_test_utils.h" 5 #include "gpu/command_buffer/tests/gl_test_utils.h"
6 #include <string> 6 #include <string>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "testing/gmock/include/gmock/gmock.h"
11 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
12 11
13 // GCC requires these declarations, but MSVC requires they not be present. 12 // GCC requires these declarations, but MSVC requires they not be present.
14 #ifndef COMPILER_MSVC 13 #ifndef COMPILER_MSVC
15 const uint8 GLTestHelper::kCheckClearValue; 14 const uint8 GLTestHelper::kCheckClearValue;
16 #endif 15 #endif
17 16
18 bool GLTestHelper::HasExtension(const char* extension) { 17 bool GLTestHelper::HasExtension(const char* extension) {
19 std::string extensions( 18 std::string extensions(
20 reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS))); 19 reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)));
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 Set32BitValue(bih.y_pels_per_meter, 0); 232 Set32BitValue(bih.y_pels_per_meter, 0);
234 Set32BitValue(bih.clr_used, 0); 233 Set32BitValue(bih.clr_used, 0);
235 Set32BitValue(bih.clr_important, 0); 234 Set32BitValue(bih.clr_important, 0);
236 235
237 fwrite(&bhf, sizeof(bhf), 1, fp); 236 fwrite(&bhf, sizeof(bhf), 1, fp);
238 fwrite(&bih, sizeof(bih), 1, fp); 237 fwrite(&bih, sizeof(bih), 1, fp);
239 fwrite(pixels, size, 1, fp); 238 fwrite(pixels, size, 1, fp);
240 fclose(fp); 239 fclose(fp);
241 return true; 240 return true;
242 } 241 }
243
244 int GLTestHelper::RunTests(int argc, char** argv) {
245 testing::InitGoogleMock(&argc, argv);
246 return RUN_ALL_TESTS();
247 }
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_test_utils.h ('k') | gpu/command_buffer/tests/gl_tests_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698