Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: skia/ext/skia_utils_win.cc

Issue 2452933002: Collect information on the dump when GetDC fails. (Closed)
Patch Set: Remove excessive check for |header|. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/win/scoped_hdc.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « base/win/scoped_hdc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698