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

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

Issue 14079: Move skia_utils into the skia namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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
« no previous file with comments | « skia/ext/skia_utils_win.cc ('k') | webkit/port/platform/graphics/chromium/FontChromiumWin.cpp » ('j') | 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/vector_device.h" 5 #include "skia/ext/vector_device.h"
6 6
7 #include "base/gfx/gdi_util.h" 7 #include "base/gfx/gdi_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/scoped_handle.h" 9 #include "base/scoped_handle.h"
10 #include "skia/ext/skia_utils_win.h" 10 #include "skia/ext/skia_utils_win.h"
11 11
12 #include "SkUtils.h" 12 #include "SkUtils.h"
13 13
14 namespace gfx { 14 namespace gfx {
15 15
16 // TODO(brettw) remove this when all the namespaces are moved to skia.
17 using namespace skia;
18
16 VectorDevice* VectorDevice::create(HDC dc, int width, int height) { 19 VectorDevice* VectorDevice::create(HDC dc, int width, int height) {
17 InitializeDC(dc); 20 InitializeDC(dc);
18 21
19 // Link the SkBitmap to the current selected bitmap in the device context. 22 // Link the SkBitmap to the current selected bitmap in the device context.
20 SkBitmap bitmap; 23 SkBitmap bitmap;
21 HGDIOBJ selected_bitmap = GetCurrentObject(dc, OBJ_BITMAP); 24 HGDIOBJ selected_bitmap = GetCurrentObject(dc, OBJ_BITMAP);
22 bool succeeded = false; 25 bool succeeded = false;
23 if (selected_bitmap != NULL) { 26 if (selected_bitmap != NULL) {
24 BITMAP bitmap_data; 27 BITMAP bitmap_data;
25 if (GetObject(selected_bitmap, sizeof(BITMAP), &bitmap_data) == 28 if (GetObject(selected_bitmap, sizeof(BITMAP), &bitmap_data) ==
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 reinterpret_cast<const BITMAPINFO*>(&hdr), 606 reinterpret_cast<const BITMAPINFO*>(&hdr),
604 DIB_RGB_COLORS, 607 DIB_RGB_COLORS,
605 SRCCOPY); 608 SRCCOPY);
606 DCHECK(result); 609 DCHECK(result);
607 } 610 }
608 Cleanup(); 611 Cleanup();
609 } 612 }
610 613
611 } // namespace gfx 614 } // namespace gfx
612 615
OLDNEW
« no previous file with comments | « skia/ext/skia_utils_win.cc ('k') | webkit/port/platform/graphics/chromium/FontChromiumWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698