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 "skia/ext/skia_utils_win.h" | 5 #include "skia/ext/skia_utils_win.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include "base/debug/gdi_debug_util_win.h" | 10 #include "base/debug/gdi_debug_util_win.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 } | 207 } |
208 | 208 |
209 BITMAPINFOHEADER hdr = {0}; | 209 BITMAPINFOHEADER hdr = {0}; |
210 CreateBitmapHeader(width, height, &hdr); | 210 CreateBitmapHeader(width, height, &hdr); |
211 HBITMAP hbitmap = CreateDIBSection(NULL, reinterpret_cast<BITMAPINFO*>(&hdr), | 211 HBITMAP hbitmap = CreateDIBSection(NULL, reinterpret_cast<BITMAPINFO*>(&hdr), |
212 0, data, shared_section, 0); | 212 0, data, shared_section, 0); |
213 | 213 |
214 // If CreateDIBSection() failed, try to get some useful information out | 214 // If CreateDIBSection() failed, try to get some useful information out |
215 // before we crash for post-mortem analysis. | 215 // before we crash for post-mortem analysis. |
216 if (!hbitmap) | 216 if (!hbitmap) |
217 base::debug::GDIBitmapAllocFailure(&hdr, shared_section); | 217 base::debug::CollectGDIUsageAndDie(&hdr, shared_section); |
218 | 218 |
219 return hbitmap; | 219 return hbitmap; |
220 } | 220 } |
221 | 221 |
222 } // namespace skia | 222 } // namespace skia |
223 | 223 |
OLD | NEW |