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

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

Issue 7019013: Removal of dependencies on PlatformDevice classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unnecessary headers. Created 9 years, 7 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <windows.h> 5 #include <windows.h>
6 6
7 #include "skia/ext/vector_platform_device_emf_win.h" 7 #include "skia/ext/vector_platform_device_emf_win.h"
8 8
9 #include "skia/ext/bitmap_platform_device.h" 9 #include "skia/ext/bitmap_platform_device.h"
10 #include "skia/ext/skia_utils_win.h" 10 #include "skia/ext/skia_utils_win.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 hdr->biSizeImage = 0; 61 hdr->biSizeImage = 0;
62 hdr->biXPelsPerMeter = 1; 62 hdr->biXPelsPerMeter = 1;
63 hdr->biYPelsPerMeter = 1; 63 hdr->biYPelsPerMeter = 1;
64 hdr->biClrUsed = 0; 64 hdr->biClrUsed = 0;
65 hdr->biClrImportant = 0; 65 hdr->biClrImportant = 0;
66 } 66 }
67 67
68 VectorPlatformDeviceEmf* VectorPlatformDeviceEmf::create(HDC dc, 68 VectorPlatformDeviceEmf* VectorPlatformDeviceEmf::create(HDC dc,
69 int width, 69 int width,
70 int height) { 70 int height) {
71 InitializeDC(dc); 71 platform_util::InitializeDC(dc);
72 72
73 // Link the SkBitmap to the current selected bitmap in the device context. 73 // Link the SkBitmap to the current selected bitmap in the device context.
74 SkBitmap bitmap; 74 SkBitmap bitmap;
75 HGDIOBJ selected_bitmap = GetCurrentObject(dc, OBJ_BITMAP); 75 HGDIOBJ selected_bitmap = GetCurrentObject(dc, OBJ_BITMAP);
76 bool succeeded = false; 76 bool succeeded = false;
77 if (selected_bitmap != NULL) { 77 if (selected_bitmap != NULL) {
78 BITMAP bitmap_data; 78 BITMAP bitmap_data;
79 if (GetObject(selected_bitmap, sizeof(BITMAP), &bitmap_data) == 79 if (GetObject(selected_bitmap, sizeof(BITMAP), &bitmap_data) ==
80 sizeof(BITMAP)) { 80 sizeof(BITMAP)) {
81 // The context has a bitmap attached. Attach our SkBitmap to it. 81 // The context has a bitmap attached. Attach our SkBitmap to it.
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 DIB_RGB_COLORS, 728 DIB_RGB_COLORS,
729 SRCCOPY); 729 SRCCOPY);
730 SkASSERT(result); 730 SkASSERT(result);
731 } 731 }
732 EndPlatformPaint(); 732 EndPlatformPaint();
733 Cleanup(); 733 Cleanup();
734 } 734 }
735 735
736 } // namespace skia 736 } // namespace skia
737 737
OLDNEW
« skia/ext/platform_device.h ('K') | « skia/ext/vector_canvas.cc ('k') | skia/skia.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698