| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "webkit/glue/image_decoder.h" | 6 #include "webkit/glue/image_decoder.h" |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "third_party/skia/include/core/SkBitmap.h" |
| 9 | 10 |
| 10 MSVC_PUSH_WARNING_LEVEL(0); | 11 MSVC_PUSH_WARNING_LEVEL(0); |
| 11 #if defined(OS_WIN) || defined(OS_LINUX) | 12 #if defined(OS_WIN) || defined(OS_LINUX) |
| 12 #include "ImageSourceSkia.h" | 13 #include "ImageSourceSkia.h" |
| 13 #elif defined(OS_MACOSX) | 14 #elif defined(OS_MACOSX) |
| 14 #include "ImageSource.h" | 15 #include "ImageSource.h" |
| 15 #include "RetainPtr.h" | 16 #include "RetainPtr.h" |
| 16 #endif | 17 #endif |
| 17 #include "IntSize.h" | 18 #include "IntSize.h" |
| 18 #include "RefPtr.h" | 19 #include "RefPtr.h" |
| 19 #include "SharedBuffer.h" | 20 #include "SharedBuffer.h" |
| 20 MSVC_POP_WARNING(); | 21 MSVC_POP_WARNING(); |
| 21 | 22 |
| 22 #include "SkBitmap.h" | |
| 23 | |
| 24 namespace webkit_glue { | 23 namespace webkit_glue { |
| 25 | 24 |
| 26 ImageDecoder::ImageDecoder() : desired_icon_size_(0, 0) { | 25 ImageDecoder::ImageDecoder() : desired_icon_size_(0, 0) { |
| 27 } | 26 } |
| 28 | 27 |
| 29 ImageDecoder::ImageDecoder(const gfx::Size& desired_icon_size) | 28 ImageDecoder::ImageDecoder(const gfx::Size& desired_icon_size) |
| 30 : desired_icon_size_(desired_icon_size) { | 29 : desired_icon_size_(desired_icon_size) { |
| 31 } | 30 } |
| 32 | 31 |
| 33 ImageDecoder::~ImageDecoder() { | 32 ImageDecoder::~ImageDecoder() { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 CGRect rect = CGRectMake(0, 0, | 98 CGRect rect = CGRectMake(0, 0, |
| 100 CGImageGetWidth(image.get()), | 99 CGImageGetWidth(image.get()), |
| 101 CGImageGetHeight(image.get())); | 100 CGImageGetHeight(image.get())); |
| 102 CGContextDrawImage(context.get(), rect, image.get()); | 101 CGContextDrawImage(context.get(), rect, image.get()); |
| 103 | 102 |
| 104 return result; | 103 return result; |
| 105 #endif | 104 #endif |
| 106 } | 105 } |
| 107 | 106 |
| 108 } // namespace webkit_glue | 107 } // namespace webkit_glue |
| OLD | NEW |