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

Unified Diff: gpu/command_buffer/tests/gl_test_utils.cc

Issue 11568029: Add a command to lose the context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add docs, lose parent and children, fix typo Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/tests/gl_test_utils.h ('k') | gpu/gpu.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_test_utils.cc
diff --git a/gpu/command_buffer/tests/gl_test_utils.cc b/gpu/command_buffer/tests/gl_test_utils.cc
index f4ea96b8662b6ddc4234c561dd2aac203a1a6160..1a3e7c2f2635ced90aa8b0bb975c4700dca48864 100644
--- a/gpu/command_buffer/tests/gl_test_utils.cc
+++ b/gpu/command_buffer/tests/gl_test_utils.cc
@@ -10,6 +10,11 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+// GCC requires these declarations, but MSVC requires they not be present.
+#ifndef COMPILER_MSVC
+const uint8 GLTestHelper::kCheckClearValue;
+#endif
+
bool GLTestHelper::HasExtension(const char* extension) {
std::string extensions(
reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)));
@@ -108,7 +113,7 @@ bool GLTestHelper::CheckPixels(
const uint8* color) {
GLsizei size = width * height * 4;
scoped_array<uint8> pixels(new uint8[size]);
- memset(pixels.get(), 123, size);
+ memset(pixels.get(), kCheckClearValue, size);
glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels.get());
bool same = true;
for (GLint yy = 0; yy < height; ++yy) {
« no previous file with comments | « gpu/command_buffer/tests/gl_test_utils.h ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698