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 "content/browser/aura/software_output_device_win.h" | 5 #include "content/browser/aura/software_output_device_win.h" |
6 | 6 |
7 #include "content/public/browser/browser_thread.h" | 7 #include "content/public/browser/browser_thread.h" |
8 #include "third_party/skia/include/core/SkBitmap.h" | 8 #include "third_party/skia/include/core/SkBitmap.h" |
9 #include "third_party/skia/include/core/SkDevice.h" | 9 #include "third_party/skia/include/core/SkDevice.h" |
10 #include "ui/compositor/compositor.h" | 10 #include "ui/compositor/compositor.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 void SoftwareOutputDeviceWin::CopyToBitmap( | 95 void SoftwareOutputDeviceWin::CopyToBitmap( |
96 const gfx::Rect& rect, SkBitmap* output) { | 96 const gfx::Rect& rect, SkBitmap* output) { |
97 DCHECK(contents_); | 97 DCHECK(contents_); |
98 SkBaseDevice* device = contents_->sk_canvas()->getDevice(); | 98 SkBaseDevice* device = contents_->sk_canvas()->getDevice(); |
99 const SkBitmap& bitmap = device->accessBitmap(false); | 99 const SkBitmap& bitmap = device->accessBitmap(false); |
100 bitmap.extractSubset(output, gfx::RectToSkIRect(rect)); | 100 bitmap.extractSubset(output, gfx::RectToSkIRect(rect)); |
101 } | 101 } |
102 | 102 |
103 } // namespace content | 103 } // namespace content |
OLD | NEW |