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

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

Issue 11227033: Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 1 month 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 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 18 matching lines...) Expand all
29 #elif defined(OS_MACOSX) 29 #elif defined(OS_MACOSX)
30 #include "gpu/command_buffer/service/texture_manager.h" 30 #include "gpu/command_buffer/service/texture_manager.h"
31 #include "content/common/gpu/media/mac_video_decode_accelerator.h" 31 #include "content/common/gpu/media/mac_video_decode_accelerator.h"
32 #endif 32 #endif
33 33
34 #include "gpu/command_buffer/service/texture_manager.h" 34 #include "gpu/command_buffer/service/texture_manager.h"
35 #include "ui/gfx/size.h" 35 #include "ui/gfx/size.h"
36 36
37 using gpu::gles2::TextureManager; 37 using gpu::gles2::TextureManager;
38 38
39 namespace content {
40
39 static bool MakeDecoderContextCurrent( 41 static bool MakeDecoderContextCurrent(
40 const base::WeakPtr<GpuCommandBufferStub> stub) { 42 const base::WeakPtr<GpuCommandBufferStub> stub) {
41 if (!stub) { 43 if (!stub) {
42 DLOG(ERROR) << "Stub is gone; won't MakeCurrent()."; 44 DLOG(ERROR) << "Stub is gone; won't MakeCurrent().";
43 return false; 45 return false;
44 } 46 }
45 47
46 if (!stub->decoder()->MakeCurrent()) { 48 if (!stub->decoder()->MakeCurrent()) {
47 DLOG(ERROR) << "Failed to MakeCurrent()"; 49 DLOG(ERROR) << "Failed to MakeCurrent()";
48 return false; 50 return false;
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 if (stub_) { 299 if (stub_) {
298 stub_->RemoveDestructionObserver(this); 300 stub_->RemoveDestructionObserver(this);
299 stub_.reset(); 301 stub_.reset();
300 } 302 }
301 } 303 }
302 304
303 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { 305 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) {
304 DCHECK(sender_); 306 DCHECK(sender_);
305 return sender_->Send(message); 307 return sender_->Send(message);
306 } 308 }
309
310 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.h ('k') | content/common/gpu/stream_texture_manager_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698