OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "content/browser/renderer_host/backing_store_mac.h" | 7 #include "content/browser/renderer_host/backing_store_mac.h" |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
11 #include "base/mac/scoped_cftyperef.h" | 11 #include "base/mac/scoped_cftyperef.h" |
12 #include "content/browser/renderer_host/render_process_host.h" | 12 #include "content/browser/renderer_host/render_process_host_impl.h" |
13 #include "content/browser/renderer_host/render_widget_host.h" | 13 #include "content/browser/renderer_host/render_widget_host.h" |
14 #include "content/browser/renderer_host/render_widget_host_view.h" | 14 #include "content/browser/renderer_host/render_widget_host_view.h" |
15 #include "skia/ext/platform_canvas.h" | 15 #include "skia/ext/platform_canvas.h" |
16 #include "third_party/skia/include/core/SkBitmap.h" | 16 #include "third_party/skia/include/core/SkBitmap.h" |
17 #include "third_party/skia/include/core/SkCanvas.h" | 17 #include "third_party/skia/include/core/SkCanvas.h" |
18 #include "ui/gfx/rect.h" | 18 #include "ui/gfx/rect.h" |
19 #include "ui/gfx/surface/transport_dib.h" | 19 #include "ui/gfx/surface/transport_dib.h" |
20 | 20 |
21 // Mac Backing Stores: | 21 // Mac Backing Stores: |
22 // | 22 // |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 CGContextRef context = CGBitmapContextCreate(NULL, | 223 CGContextRef context = CGBitmapContextCreate(NULL, |
224 size().width(), size().height(), | 224 size().width(), size().height(), |
225 8, size().width() * 4, | 225 8, size().width() * 4, |
226 base::mac::GetSystemColorSpace(), | 226 base::mac::GetSystemColorSpace(), |
227 kCGImageAlphaPremultipliedFirst | | 227 kCGImageAlphaPremultipliedFirst | |
228 kCGBitmapByteOrder32Host); | 228 kCGBitmapByteOrder32Host); |
229 DCHECK(context); | 229 DCHECK(context); |
230 | 230 |
231 return context; | 231 return context; |
232 } | 232 } |
OLD | NEW |