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

Side by Side Diff: third_party/WebKit/public/platform/WebMediaPlayer.h

Issue 2791813003: Fix broken draw/upload paths from videos to 2D canvas and WebGL. (Closed)
Patch Set: Fix per review feedback from sandersd@. Created 3 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
OLDNEW
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
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 natural size of the current 180 // Do a GPU-GPU texture copy of the current video frame to |texture|,
181 // video frame to |texture|. Caller is responsible for allocating 181 // reallocating |texture| at the appropriate size with given internal
182 // |texture| with the appropriate size. If the copy is impossible or 182 // format and type if necessary. If the copy is impossible or fails, it
183 // fails, it returns false. 183 // returns false.
184 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, 184 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*,
185 unsigned texture, 185 unsigned texture,
186 unsigned internalFormat,
187 unsigned type,
186 bool premultiplyAlpha, 188 bool premultiplyAlpha,
187 bool flipY) { 189 bool flipY) {
188 return false; 190 return false;
189 } 191 }
190 192
191 // TODO(kbr): when updating calling code to use this, remove the
192 // |internalFormat| and |type| parameters. crbug.com/349871
193 // 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
194 // false. 194 // false.
195 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, 195 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*,
196 unsigned target, 196 unsigned target,
197 unsigned texture, 197 unsigned texture,
198 unsigned internalFormat, 198 unsigned internalFormat,
199 unsigned type, 199 unsigned type,
200 int level, 200 int level,
201 bool premultiplyAlpha, 201 bool premultiplyAlpha,
202 bool flipY) { 202 bool flipY) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 virtual bool getLastUploadedFrameInfo(unsigned* width, 285 virtual bool getLastUploadedFrameInfo(unsigned* width,
286 unsigned* height, 286 unsigned* height,
287 double* timestamp) { 287 double* timestamp) {
288 return false; 288 return false;
289 } 289 }
290 }; 290 };
291 291
292 } // namespace blink 292 } // namespace blink
293 293
294 #endif 294 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698