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 "config.h" | 5 #include "config.h" |
6 #include "core/frame/ImageBitmap.h" | 6 #include "core/frame/ImageBitmap.h" |
7 | 7 |
8 #include "core/html/HTMLCanvasElement.h" | 8 #include "core/html/HTMLCanvasElement.h" |
9 #include "core/html/HTMLImageElement.h" | |
10 #include "core/html/HTMLVideoElement.h" | 9 #include "core/html/HTMLVideoElement.h" |
11 #include "core/html/ImageData.h" | 10 #include "core/html/ImageData.h" |
12 #include "core/html/canvas/CanvasRenderingContext.h" | 11 #include "core/html/canvas/CanvasRenderingContext.h" |
13 #include "core/platform/graphics/BitmapImage.h" | 12 #include "core/platform/graphics/BitmapImage.h" |
14 #include "core/platform/graphics/GraphicsContext.h" | 13 #include "core/platform/graphics/GraphicsContext.h" |
15 #include "core/platform/graphics/ImageBuffer.h" | 14 #include "core/platform/graphics/ImageBuffer.h" |
16 #include "wtf/RefPtr.h" | 15 #include "wtf/RefPtr.h" |
17 | 16 |
18 using namespace std; | 17 using namespace std; |
19 | 18 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 190 |
192 PassRefPtr<Image> ImageBitmap::bitmapImage() const | 191 PassRefPtr<Image> ImageBitmap::bitmapImage() const |
193 { | 192 { |
194 ASSERT((m_imageElement || m_bitmap || !m_bitmapRect.width() || !m_bitmapRect
.height()) && (!m_imageElement || !m_bitmap)); | 193 ASSERT((m_imageElement || m_bitmap || !m_bitmapRect.width() || !m_bitmapRect
.height()) && (!m_imageElement || !m_bitmap)); |
195 if (m_imageElement) | 194 if (m_imageElement) |
196 return m_imageElement->cachedImage()->image(); | 195 return m_imageElement->cachedImage()->image(); |
197 return m_bitmap; | 196 return m_bitmap; |
198 } | 197 } |
199 | 198 |
200 } | 199 } |
OLD | NEW |