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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp

Issue 1609343004: Add display list fallback reason histograms for 2D canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl web Created 4 years, 10 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) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 278 }
279 279
280 KURL HTMLVideoElement::posterImageURL() const 280 KURL HTMLVideoElement::posterImageURL() const
281 { 281 {
282 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); 282 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL());
283 if (url.isEmpty()) 283 if (url.isEmpty())
284 return KURL(); 284 return KURL();
285 return document().completeURL(url); 285 return document().completeURL(url);
286 } 286 }
287 287
288 PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageStatus* s tatus, AccelerationHint) const 288 PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageStatus* s tatus, AccelerationHint, SnapshotReason) const
289 { 289 {
290 if (!hasAvailableVideoFrame()) { 290 if (!hasAvailableVideoFrame()) {
291 *status = InvalidSourceImageStatus; 291 *status = InvalidSourceImageStatus;
292 return nullptr; 292 return nullptr;
293 } 293 }
294 294
295 IntSize intrinsicSize(videoWidth(), videoHeight()); 295 IntSize intrinsicSize(videoWidth(), videoHeight());
296 // FIXME: Not sure if we dhould we be doing anything with the AccelerationHi nt argument here? 296 // FIXME: Not sure if we dhould we be doing anything with the AccelerationHi nt argument here?
297 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(intrinsicSize); 297 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(intrinsicSize);
298 if (!imageBuffer) { 298 if (!imageBuffer) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 return ScriptPromise(); 338 return ScriptPromise();
339 } 339 }
340 if (!sw || !sh) { 340 if (!sw || !sh) {
341 exceptionState.throwDOMException(IndexSizeError, String::format("The sou rce %s provided is 0.", sw ? "height" : "width")); 341 exceptionState.throwDOMException(IndexSizeError, String::format("The sou rce %s provided is 0.", sw ? "height" : "width"));
342 return ScriptPromise(); 342 return ScriptPromise();
343 } 343 }
344 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat e(this, IntRect(sx, sy, sw, sh), eventTarget.toDOMWindow()->document(), options) ); 344 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat e(this, IntRect(sx, sy, sw, sh), eventTarget.toDOMWindow()->document(), options) );
345 } 345 }
346 346
347 } // namespace blink 347 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLVideoElement.h ('k') | third_party/WebKit/Source/core/html/canvas/CanvasImageSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698