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

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

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 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 #include <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 #include <GLES2/gl2chromium.h> 6 #include <GLES2/gl2chromium.h>
7 #include <GLES2/gl2ext.h> 7 #include <GLES2/gl2ext.h>
8 #include <GLES2/gl2extchromium.h> 8 #include <GLES2/gl2extchromium.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 EXPECT_TRUE(gl_.decoder()->GetImageManager()->LookupImage(image_id) != NULL); 102 EXPECT_TRUE(gl_.decoder()->GetImageManager()->LookupImage(image_id) != NULL);
103 103
104 // Bind the texture and the image. 104 // Bind the texture and the image.
105 glBindTexture(GL_TEXTURE_2D, texture_ids_[0]); 105 glBindTexture(GL_TEXTURE_2D, texture_ids_[0]);
106 glBindTexImage2DCHROMIUM(GL_TEXTURE_2D, image_id); 106 glBindTexImage2DCHROMIUM(GL_TEXTURE_2D, image_id);
107 107
108 // Copy texture so we can verify result using CheckPixels. 108 // Copy texture so we can verify result using CheckPixels.
109 glCopyTextureCHROMIUM(GL_TEXTURE_2D, 109 glCopyTextureCHROMIUM(GL_TEXTURE_2D,
110 texture_ids_[0], 110 texture_ids_[0],
111 texture_ids_[1], 111 texture_ids_[1],
112 0,
113 GL_RGBA, 112 GL_RGBA,
114 GL_UNSIGNED_BYTE); 113 GL_UNSIGNED_BYTE);
115 EXPECT_TRUE(glGetError() == GL_NO_ERROR); 114 EXPECT_TRUE(glGetError() == GL_NO_ERROR);
116 115
117 // Check if pixels match the values that were assigned to the mapped buffer. 116 // Check if pixels match the values that were assigned to the mapped buffer.
118 GLTestHelper::CheckPixels(0, 0, kImageWidth, kImageHeight, 0, pixels); 117 GLTestHelper::CheckPixels(0, 0, kImageWidth, kImageHeight, 0, pixels);
119 EXPECT_TRUE(GL_NO_ERROR == glGetError()); 118 EXPECT_TRUE(GL_NO_ERROR == glGetError());
120 119
121 // Release the image. 120 // Release the image.
122 glReleaseTexImage2DCHROMIUM(GL_TEXTURE_2D, image_id); 121 glReleaseTexImage2DCHROMIUM(GL_TEXTURE_2D, image_id);
123 122
124 // Destroy the image. 123 // Destroy the image.
125 glDestroyImageCHROMIUM(image_id); 124 glDestroyImageCHROMIUM(image_id);
126 } 125 }
127 126
128 } // namespace gles2 127 } // namespace gles2
129 } // namespace gpu 128 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc ('k') | gpu/gpu_unittests.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698