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

Side by Side Diff: Source/core/frame/ImageBitmap.cpp

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/ImageBitmap.h ('k') | Source/core/frame/ImageBitmapTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/HTMLVideoElement.h" 9 #include "core/html/HTMLVideoElement.h"
10 #include "core/html/ImageData.h" 10 #include "core/html/ImageData.h"
11 #include "core/html/canvas/CanvasRenderingContext.h" 11 #include "core/html/canvas/CanvasRenderingContext.h"
12 #include "core/platform/graphics/BitmapImage.h" 12 #include "platform/graphics/BitmapImage.h"
13 #include "core/platform/graphics/GraphicsContext.h" 13 #include "platform/graphics/GraphicsContext.h"
14 #include "core/platform/graphics/ImageBuffer.h" 14 #include "platform/graphics/ImageBuffer.h"
15 #include "wtf/RefPtr.h" 15 #include "wtf/RefPtr.h"
16 16
17 using namespace std; 17 using namespace std;
18 18
19 namespace WebCore { 19 namespace WebCore {
20 20
21 static inline IntRect normalizeRect(const IntRect& rect) 21 static inline IntRect normalizeRect(const IntRect& rect)
22 { 22 {
23 return IntRect(min(rect.x(), rect.maxX()), 23 return IntRect(min(rect.x(), rect.maxX()),
24 min(rect.y(), rect.maxY()), 24 min(rect.y(), rect.maxY()),
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 PassRefPtr<Image> ImageBitmap::bitmapImage() const 191 PassRefPtr<Image> ImageBitmap::bitmapImage() const
192 { 192 {
193 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));
194 if (m_imageElement) 194 if (m_imageElement)
195 return m_imageElement->cachedImage()->image(); 195 return m_imageElement->cachedImage()->image();
196 return m_bitmap; 196 return m_bitmap;
197 } 197 }
198 198
199 } 199 }
OLDNEW
« no previous file with comments | « Source/core/frame/ImageBitmap.h ('k') | Source/core/frame/ImageBitmapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698