OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/compositor/software_output_device_win.h" | 5 #include "content/browser/compositor/software_output_device_win.h" |
6 | 6 |
7 #include "base/debug/alias.h" | 7 #include "base/debug/alias.h" |
8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 #include "cc/resources/shared_bitmap.h" | 9 #include "cc/resources/shared_bitmap.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
11 #include "skia/ext/platform_canvas.h" | 11 #include "skia/ext/platform_canvas.h" |
12 #include "third_party/skia/include/core/SkBitmap.h" | |
13 #include "third_party/skia/include/core/SkDevice.h" | |
14 #include "ui/compositor/compositor.h" | 12 #include "ui/compositor/compositor.h" |
15 #include "ui/gfx/gdi_util.h" | 13 #include "ui/gfx/gdi_util.h" |
16 #include "ui/gfx/skia_util.h" | 14 #include "ui/gfx/skia_util.h" |
17 | 15 |
18 namespace content { | 16 namespace content { |
19 | 17 |
20 // If a window is larger than this in bytes, don't even try to create a | 18 // If a window is larger than this in bytes, don't even try to create a |
21 // backing bitmap for it. | 19 // backing bitmap for it. |
22 static const size_t kMaxBitmapSizeBytes = 4 * (16384 * 8192); | 20 static const size_t kMaxBitmapSizeBytes = 4 * (16384 * 8192); |
23 | 21 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 } | 193 } |
196 } | 194 } |
197 | 195 |
198 void SoftwareOutputDeviceWin::ReleaseContents() { | 196 void SoftwareOutputDeviceWin::ReleaseContents() { |
199 DCHECK(!contents_ || contents_->unique()); | 197 DCHECK(!contents_ || contents_->unique()); |
200 DCHECK(!in_paint_); | 198 DCHECK(!in_paint_); |
201 contents_.clear(); | 199 contents_.clear(); |
202 } | 200 } |
203 | 201 |
204 } // namespace content | 202 } // namespace content |
OLD | NEW |