OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 virtual unsigned DecodedFrameCount() const = 0; | 170 virtual unsigned DecodedFrameCount() const = 0; |
171 virtual unsigned DroppedFrameCount() const = 0; | 171 virtual unsigned DroppedFrameCount() const = 0; |
172 virtual unsigned CorruptedFrameCount() const { return 0; } | 172 virtual unsigned CorruptedFrameCount() const { return 0; } |
173 virtual size_t AudioDecodedByteCount() const = 0; | 173 virtual size_t AudioDecodedByteCount() const = 0; |
174 virtual size_t VideoDecodedByteCount() const = 0; | 174 virtual size_t VideoDecodedByteCount() const = 0; |
175 | 175 |
176 virtual void Paint(WebCanvas*, const WebRect&, cc::PaintFlags&) = 0; | 176 virtual void Paint(WebCanvas*, const WebRect&, cc::PaintFlags&) = 0; |
177 | 177 |
178 // TODO(kbr): remove non-|target| version. crbug.com/349871 | 178 // TODO(kbr): remove non-|target| version. crbug.com/349871 |
179 // | 179 // |
180 // Do a GPU-GPU texture copy of the current video frame to |texture|, | 180 // Do a GPU-GPU texture copy of the natural size of the current |
181 // reallocating |texture| at the appropriate size with given internal | 181 // video frame to |texture|. Caller is responsible for allocating |
182 // format, format, and type if necessary. If the copy is impossible | 182 // |texture| with the appropriate size. If the copy is impossible or |
183 // or fails, it returns false. | 183 // fails, it returns false. |
184 virtual bool CopyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, | 184 virtual bool CopyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, |
185 unsigned texture, | 185 unsigned texture, |
186 unsigned internal_format, | |
187 unsigned format, | |
188 unsigned type, | |
189 bool premultiply_alpha, | 186 bool premultiply_alpha, |
190 bool flip_y) { | 187 bool flip_y) { |
191 return false; | 188 return false; |
192 } | 189 } |
193 | 190 |
| 191 // TODO(kbr): when updating calling code to use this, remove the |
| 192 // |internalFormat| and |type| parameters. crbug.com/349871 |
194 // Do a GPU-GPU textures copy. If the copy is impossible or fails, it returns | 193 // Do a GPU-GPU textures copy. If the copy is impossible or fails, it returns |
195 // false. | 194 // false. |
196 virtual bool CopyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, | 195 virtual bool CopyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, |
197 unsigned target, | 196 unsigned target, |
198 unsigned texture, | 197 unsigned texture, |
199 unsigned internal_format, | 198 unsigned internal_format, |
200 unsigned type, | 199 unsigned type, |
201 int level, | 200 int level, |
202 bool premultiply_alpha, | 201 bool premultiply_alpha, |
203 bool flip_y) { | 202 bool flip_y) { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 virtual bool GetLastUploadedFrameInfo(unsigned* width, | 285 virtual bool GetLastUploadedFrameInfo(unsigned* width, |
287 unsigned* height, | 286 unsigned* height, |
288 double* timestamp) { | 287 double* timestamp) { |
289 return false; | 288 return false; |
290 } | 289 } |
291 }; | 290 }; |
292 | 291 |
293 } // namespace blink | 292 } // namespace blink |
294 | 293 |
295 #endif | 294 #endif |
OLD | NEW |