Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 // content/common/gpu/media should implement this, and implementations in | 136 // content/common/gpu/media should implement this, and implementations in |
| 137 // other processes should not override the default implementation. | 137 // other processes should not override the default implementation. |
| 138 // Returns true if VDA::Decode and VDA::Client callbacks can run on the IO | 138 // Returns true if VDA::Decode and VDA::Client callbacks can run on the IO |
| 139 // thread. Otherwise they will run on the GPU child thread. The purpose of | 139 // thread. Otherwise they will run on the GPU child thread. The purpose of |
| 140 // running Decode on the IO thread is to reduce decode latency. Note Decode | 140 // running Decode on the IO thread is to reduce decode latency. Note Decode |
| 141 // should return as soon as possible and not block on the IO thread. Also, | 141 // should return as soon as possible and not block on the IO thread. Also, |
| 142 // PictureReady should be run on the child thread if a picture is delivered | 142 // PictureReady should be run on the child thread if a picture is delivered |
| 143 // the first time so it can be cleared. | 143 // the first time so it can be cleared. |
| 144 virtual bool CanDecodeOnIOThread(); | 144 virtual bool CanDecodeOnIOThread(); |
| 145 | 145 |
| 146 // Windows creates a BGRA texture. | |
| 147 // FIXME: after moving to D3D11, remove this workaround. crbug.com/438691 | |
| 148 virtual unsigned GetSurfaceInternalFormat() const; | |
|
Ken Russell (switch to Gerrit)
2014/12/08 19:52:34
Minor note: the Google C++ style guide says to avo
dshwang
2014/12/08 20:30:38
I see. Forward declare GLenum like gles2_cmd_forma
| |
| 149 | |
| 146 protected: | 150 protected: |
| 147 // Do not delete directly; use Destroy() or own it with a scoped_ptr, which | 151 // Do not delete directly; use Destroy() or own it with a scoped_ptr, which |
| 148 // will Destroy() it properly by default. | 152 // will Destroy() it properly by default. |
| 149 virtual ~VideoDecodeAccelerator(); | 153 virtual ~VideoDecodeAccelerator(); |
| 150 }; | 154 }; |
| 151 | 155 |
| 152 } // namespace media | 156 } // namespace media |
| 153 | 157 |
| 154 namespace base { | 158 namespace base { |
| 155 | 159 |
| 156 template <class T> | 160 template <class T> |
| 157 struct DefaultDeleter; | 161 struct DefaultDeleter; |
| 158 | 162 |
| 159 // Specialize DefaultDeleter so that scoped_ptr<VideoDecodeAccelerator> always | 163 // Specialize DefaultDeleter so that scoped_ptr<VideoDecodeAccelerator> always |
| 160 // uses "Destroy()" instead of trying to use the destructor. | 164 // uses "Destroy()" instead of trying to use the destructor. |
| 161 template <> | 165 template <> |
| 162 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> { | 166 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> { |
| 163 public: | 167 public: |
| 164 void operator()(void* video_decode_accelerator) const; | 168 void operator()(void* video_decode_accelerator) const; |
| 165 }; | 169 }; |
| 166 | 170 |
| 167 } // namespace base | 171 } // namespace base |
| 168 | 172 |
| 169 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 173 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |