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/graphics/skia/SkiaUtils.h" | 10 #include "platform/graphics/skia/SkiaUtils.h" |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 } | 666 } |
667 | 667 |
668 unsigned long ImageBitmap::height() const | 668 unsigned long ImageBitmap::height() const |
669 { | 669 { |
670 if (!m_image) | 670 if (!m_image) |
671 return 0; | 671 return 0; |
672 ASSERT(m_image->height() > 0); | 672 ASSERT(m_image->height() > 0); |
673 return m_image->height(); | 673 return m_image->height(); |
674 } | 674 } |
675 | 675 |
676 bool ImageBitmap::isTextureBacked() const | 676 bool ImageBitmap::isAccelerated() const |
677 { | 677 { |
678 return m_image && (m_image->isTextureBacked() || m_image->hasMailbox()); | 678 return m_image && (m_image->isTextureBacked() || m_image->hasMailbox()); |
679 } | 679 } |
680 | 680 |
681 IntSize ImageBitmap::size() const | 681 IntSize ImageBitmap::size() const |
682 { | 682 { |
683 if (!m_image) | 683 if (!m_image) |
684 return IntSize(); | 684 return IntSize(); |
685 ASSERT(m_image->width() > 0 && m_image->height() > 0); | 685 ASSERT(m_image->width() > 0 && m_image->height() > 0); |
686 return IntSize(m_image->width(), m_image->height()); | 686 return IntSize(m_image->width(), m_image->height()); |
(...skipping 22 matching lines...) Expand all Loading... |
709 FloatSize ImageBitmap::elementSize(const FloatSize&) const | 709 FloatSize ImageBitmap::elementSize(const FloatSize&) const |
710 { | 710 { |
711 return FloatSize(width(), height()); | 711 return FloatSize(width(), height()); |
712 } | 712 } |
713 | 713 |
714 DEFINE_TRACE(ImageBitmap) | 714 DEFINE_TRACE(ImageBitmap) |
715 { | 715 { |
716 } | 716 } |
717 | 717 |
718 } // namespace blink | 718 } // namespace blink |
OLD | NEW |