OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "core/frame/ImageBitmap.h" | 5 #include "core/frame/ImageBitmap.h" |
6 | 6 |
7 #include "core/html/HTMLCanvasElement.h" | 7 #include "core/html/HTMLCanvasElement.h" |
8 #include "core/html/HTMLVideoElement.h" | 8 #include "core/html/HTMLVideoElement.h" |
9 #include "core/html/ImageData.h" | 9 #include "core/html/ImageData.h" |
10 #include "platform/image-decoders/ImageDecoder.h" | 10 #include "platform/image-decoders/ImageDecoder.h" |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 exceptionState.throwDOMException(IndexSizeError, String::format("The sou
rce %s provided is 0.", sw ? "height" : "width")); | 342 exceptionState.throwDOMException(IndexSizeError, String::format("The sou
rce %s provided is 0.", sw ? "height" : "width")); |
343 return ScriptPromise(); | 343 return ScriptPromise(); |
344 } | 344 } |
345 return ImageBitmapSource::fulfillImageBitmap(scriptState, create(this, IntRe
ct(sx, sy, sw, sh), options)); | 345 return ImageBitmapSource::fulfillImageBitmap(scriptState, create(this, IntRe
ct(sx, sy, sw, sh), options)); |
346 } | 346 } |
347 | 347 |
348 void ImageBitmap::notifyImageSourceChanged() | 348 void ImageBitmap::notifyImageSourceChanged() |
349 { | 349 { |
350 } | 350 } |
351 | 351 |
352 PassRefPtr<Image> ImageBitmap::getSourceImageForCanvas(SourceImageStatus* status
, AccelerationHint, SnapshotReason) const | 352 PassRefPtr<Image> ImageBitmap::getSourceImageForCanvas(SourceImageStatus* status
, AccelerationHint, SnapshotReason, const FloatSize&) const |
353 { | 353 { |
354 *status = NormalSourceImageStatus; | 354 *status = NormalSourceImageStatus; |
355 return m_image ? m_image : nullptr; | 355 return m_image ? m_image : nullptr; |
356 } | 356 } |
357 | 357 |
358 void ImageBitmap::adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const | 358 void ImageBitmap::adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const |
359 { | 359 { |
360 } | 360 } |
361 | 361 |
362 FloatSize ImageBitmap::elementSize() const | 362 FloatSize ImageBitmap::elementSize(const FloatSize&) const |
363 { | 363 { |
364 return FloatSize(width(), height()); | 364 return FloatSize(width(), height()); |
365 } | 365 } |
366 | 366 |
367 DEFINE_TRACE(ImageBitmap) | 367 DEFINE_TRACE(ImageBitmap) |
368 { | 368 { |
369 ImageLoaderClient::trace(visitor); | 369 ImageLoaderClient::trace(visitor); |
370 } | 370 } |
371 | 371 |
372 } // namespace blink | 372 } // namespace blink |
OLD | NEW |