OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/media/window_icon_util.h" | 5 #include "chrome/browser/media/webrtc/window_icon_util.h" |
6 | 6 |
7 #include <ApplicationServices/ApplicationServices.h> | 7 #include <ApplicationServices/ApplicationServices.h> |
8 #include <Cocoa/Cocoa.h> | 8 #include <Cocoa/Cocoa.h> |
9 #include <CoreFoundation/CoreFoundation.h> | 9 #include <CoreFoundation/CoreFoundation.h> |
10 | 10 |
11 #include "third_party/libyuv/include/libyuv/convert_argb.h" | 11 #include "third_party/libyuv/include/libyuv/convert_argb.h" |
12 | 12 |
13 gfx::ImageSkia GetWindowIcon(content::DesktopMediaID id) { | 13 gfx::ImageSkia GetWindowIcon(content::DesktopMediaID id) { |
14 DCHECK(id.type == content::DesktopMediaID::TYPE_WINDOW); | 14 DCHECK(id.type == content::DesktopMediaID::TYPE_WINDOW); |
15 | 15 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 uint8_t* pixels_data = reinterpret_cast<uint8_t*>(result.getPixels()); | 58 uint8_t* pixels_data = reinterpret_cast<uint8_t*>(result.getPixels()); |
59 | 59 |
60 libyuv::ABGRToARGB(src_data, src_stride, pixels_data, result.rowBytes(), | 60 libyuv::ABGRToARGB(src_data, src_stride, pixels_data, result.rowBytes(), |
61 width, height); | 61 width, height); |
62 | 62 |
63 CFRelease(cf_data); | 63 CFRelease(cf_data); |
64 | 64 |
65 return gfx::ImageSkia::CreateFrom1xBitmap(result); | 65 return gfx::ImageSkia::CreateFrom1xBitmap(result); |
66 } | 66 } |
OLD | NEW |