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 "PlatformCanvasWin.h" | 5 #include "skia/ext/platform_canvas_win.h" |
6 | |
7 #include "BitmapPlatformDeviceWin.h" | |
8 | 6 |
9 #include "base/logging.h" | 7 #include "base/logging.h" |
10 #include "base/process_util.h" | 8 #include "base/process_util.h" |
| 9 #include "skia/ext/bitmap_platform_device_win.h" |
11 | 10 |
12 namespace gfx { | 11 namespace gfx { |
13 | 12 |
14 // Crashes the process. This is called when a bitmap allocation fails, and this | 13 // Crashes the process. This is called when a bitmap allocation fails, and this |
15 // function tries to determine why it might have failed, and crash on different | 14 // function tries to determine why it might have failed, and crash on different |
16 // lines. This allows us to see in crash dumps the most likely reason for the | 15 // lines. This allows us to see in crash dumps the most likely reason for the |
17 // failure. It takes the size of the bitmap we were trying to allocate as its | 16 // failure. It takes the size of the bitmap we were trying to allocate as its |
18 // arguments so we can check that as well. | 17 // arguments so we can check that as well. |
19 void CrashForBitmapAllocationFailure(int w, int h) { | 18 void CrashForBitmapAllocationFailure(int w, int h) { |
20 // The maximum number of GDI objects per process is 10K. If we're very close | 19 // The maximum number of GDI objects per process is 10K. If we're very close |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 ReleaseDC(NULL, screen_dc); | 108 ReleaseDC(NULL, screen_dc); |
110 return device; | 109 return device; |
111 } | 110 } |
112 | 111 |
113 SkDevice* PlatformCanvasWin::setBitmapDevice(const SkBitmap&) { | 112 SkDevice* PlatformCanvasWin::setBitmapDevice(const SkBitmap&) { |
114 NOTREACHED(); | 113 NOTREACHED(); |
115 return NULL; | 114 return NULL; |
116 } | 115 } |
117 | 116 |
118 } // namespace gfx | 117 } // namespace gfx |
OLD | NEW |