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

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

Issue 10392068: ui: Move gl/ directory out of gfx/, up to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac_rel Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/tests/gl_tests_main.cc ('k') | gpu/command_buffer_service.gypi » ('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 <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 #include <GLES2/gl2ext.h> 6 #include <GLES2/gl2ext.h>
7 7
8 #include "gpu/command_buffer/service/mailbox_manager.h" 8 #include "gpu/command_buffer/service/mailbox_manager.h"
9 #include "gpu/command_buffer/tests/gl_manager.h" 9 #include "gpu/command_buffer/tests/gl_manager.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/gfx/gl/gl_share_group.h" 12 #include "ui/gl/gl_share_group.h"
13 13
14 namespace gpu { 14 namespace gpu {
15 15
16 namespace { 16 namespace {
17 uint32 ReadTexel(GLuint id, GLint x, GLint y) { 17 uint32 ReadTexel(GLuint id, GLint x, GLint y) {
18 GLint old_fbo = 0; 18 GLint old_fbo = 0;
19 glGetIntegerv(GL_FRAMEBUFFER_BINDING, &old_fbo); 19 glGetIntegerv(GL_FRAMEBUFFER_BINDING, &old_fbo);
20 20
21 GLuint fbo; 21 GLuint fbo;
22 glGenFramebuffers(1, &fbo); 22 glGenFramebuffers(1, &fbo);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 glConsumeTextureCHROMIUM(GL_TEXTURE_2D, invalid_mailbox); 152 glConsumeTextureCHROMIUM(GL_TEXTURE_2D, invalid_mailbox);
153 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError()); 153 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError());
154 154
155 // Ensure level 0 is still intact after glConsumeTextureCHROMIUM fails. 155 // Ensure level 0 is still intact after glConsumeTextureCHROMIUM fails.
156 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); 156 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
157 EXPECT_EQ(source_pixel, ReadTexel(tex, 0, 0)); 157 EXPECT_EQ(source_pixel, ReadTexel(tex, 0, 0));
158 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); 158 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
159 } 159 }
160 } // namespace gpu 160 } // namespace gpu
161 161
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_tests_main.cc ('k') | gpu/command_buffer_service.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698