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

Side by Side Diff: content/common/gpu/media/omx_video_decode_accelerator_unittest.cc

Issue 7210055: ovda_unittest: sets wrap_s&t parameters to textures (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 5 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 | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // The bulk of this file is support code; sorry about that. Here's an overview 5 // The bulk of this file is support code; sorry about that. Here's an overview
6 // to hopefully help readers of this code: 6 // to hopefully help readers of this code:
7 // - RenderingHelper is charged with interacting with X11, EGL, and GLES2. 7 // - RenderingHelper is charged with interacting with X11, EGL, and GLES2.
8 // - ClientState is an enum for the state of the decode client used by the test. 8 // - ClientState is an enum for the state of the decode client used by the test.
9 // - ClientStateNotification is a barrier abstraction that allows the test code 9 // - ClientStateNotification is a barrier abstraction that allows the test code
10 // to be written sequentially and wait for the decode client to see certain 10 // to be written sequentially and wait for the decode client to see certain
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 CHECK(eglMakeCurrent(egl_display_, egl_surfaces_[window_id], 302 CHECK(eglMakeCurrent(egl_display_, egl_surfaces_[window_id],
303 egl_surfaces_[window_id], egl_context_)) 303 egl_surfaces_[window_id], egl_context_))
304 << eglGetError(); 304 << eglGetError();
305 glGenTextures(1, texture_id); 305 glGenTextures(1, texture_id);
306 glBindTexture(GL_TEXTURE_2D, *texture_id); 306 glBindTexture(GL_TEXTURE_2D, *texture_id);
307 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width_, height_, 0, GL_RGBA, 307 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width_, height_, 0, GL_RGBA,
308 GL_UNSIGNED_BYTE, NULL); 308 GL_UNSIGNED_BYTE, NULL);
309 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 309 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
310 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 310 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
311 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
312 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
Ami GONE FROM CHROMIUM 2011/07/01 16:16:04 Why GL_CLAMP_TO_EDGE vs. other settings? What ha
311 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR); 313 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR);
312 CHECK(texture_id_to_surface_index_.insert( 314 CHECK(texture_id_to_surface_index_.insert(
313 std::make_pair(*texture_id, window_id)).second); 315 std::make_pair(*texture_id, window_id)).second);
314 done->Signal(); 316 done->Signal();
315 } 317 }
316 318
317 void RenderingHelper::RenderTexture(GLuint texture_id) { 319 void RenderingHelper::RenderTexture(GLuint texture_id) {
318 CHECK_EQ(MessageLoop::current(), message_loop_); 320 CHECK_EQ(MessageLoop::current(), message_loop_);
319 glActiveTexture(GL_TEXTURE0); 321 glActiveTexture(GL_TEXTURE0);
320 glBindTexture(GL_TEXTURE_2D, texture_id); 322 glBindTexture(GL_TEXTURE_2D, texture_id);
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 std::make_pair(15, 1))); 748 std::make_pair(15, 1)));
747 749
748 // TODO(fischman, vrk): add more tests! In particular: 750 // TODO(fischman, vrk): add more tests! In particular:
749 // - Test life-cycle: Seek/Stop/Pause/Play/RePlay for a single decoder. 751 // - Test life-cycle: Seek/Stop/Pause/Play/RePlay for a single decoder.
750 // - Test for memory leaks (valgrind) 752 // - Test for memory leaks (valgrind)
751 // - Test alternate configurations 753 // - Test alternate configurations
752 // - Test failure conditions. 754 // - Test failure conditions.
753 // - Test frame size changes mid-stream 755 // - Test frame size changes mid-stream
754 756
755 } // namespace 757 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698