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

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

Issue 9958034: Convert plugin and GPU process to brokered handle duplication. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
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 // 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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 DeleteDecoder(); // Clean up in case of expected error. 648 DeleteDecoder(); // Clean up in case of expected error.
649 CHECK(decoder_deleted()); 649 CHECK(decoder_deleted());
650 STLDeleteValues(&picture_buffers_by_id_); 650 STLDeleteValues(&picture_buffers_by_id_);
651 SetState(CS_DESTROYED); 651 SetState(CS_DESTROYED);
652 } 652 }
653 653
654 void EglRenderingVDAClient::CreateDecoder() { 654 void EglRenderingVDAClient::CreateDecoder() {
655 CHECK(decoder_deleted()); 655 CHECK(decoder_deleted());
656 #if defined(OS_WIN) 656 #if defined(OS_WIN)
657 scoped_refptr<DXVAVideoDecodeAccelerator> decoder = 657 scoped_refptr<DXVAVideoDecodeAccelerator> decoder =
658 new DXVAVideoDecodeAccelerator(this, base::GetCurrentProcessHandle()); 658 new DXVAVideoDecodeAccelerator(this);
659 #else // OS_WIN 659 #else // OS_WIN
660 scoped_refptr<OmxVideoDecodeAccelerator> decoder = 660 scoped_refptr<OmxVideoDecodeAccelerator> decoder =
661 new OmxVideoDecodeAccelerator(this); 661 new OmxVideoDecodeAccelerator(this);
662 decoder->SetEglState(egl_display(), egl_context()); 662 decoder->SetEglState(egl_display(), egl_context());
663 #endif // OS_WIN 663 #endif // OS_WIN
664 decoder_ = decoder.release(); 664 decoder_ = decoder.release();
665 SetState(CS_DECODER_SET); 665 SetState(CS_DECODER_SET);
666 if (decoder_deleted()) 666 if (decoder_deleted())
667 return; 667 return;
668 668
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1))); 1166 gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1)));
1167 scoped_refptr<gfx::GLContext> context( 1167 scoped_refptr<gfx::GLContext> context(
1168 gfx::GLContext::CreateGLContext(NULL, surface.get(), 1168 gfx::GLContext::CreateGLContext(NULL, surface.get(),
1169 gfx::PreferIntegratedGpu)); 1169 gfx::PreferIntegratedGpu));
1170 context->MakeCurrent(surface.get()); 1170 context->MakeCurrent(surface.get());
1171 } 1171 }
1172 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); 1172 DXVAVideoDecodeAccelerator::PreSandboxInitialization();
1173 #endif // OS_WIN 1173 #endif // OS_WIN
1174 return RUN_ALL_TESTS(); 1174 return RUN_ALL_TESTS();
1175 } 1175 }
OLDNEW
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | content/common/np_channel_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698