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

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

Issue 6691067: Fixed a few styles issues in skia::PlatformDevice. Made function names consistent. Added Begin/En... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
« no previous file with comments | « skia/ext/platform_device_mac.h ('k') | skia/ext/platform_device_win.h » ('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/bitmap_platform_device_mac.h" 5 #include "skia/ext/bitmap_platform_device_mac.h"
6 6
7 #include "skia/ext/skia_utils_mac.h" 7 #include "skia/ext/skia_utils_mac.h"
8 #include "third_party/skia/include/core/SkMatrix.h" 8 #include "third_party/skia/include/core/SkMatrix.h"
9 #include "third_party/skia/include/core/SkPath.h" 9 #include "third_party/skia/include/core/SkPath.h"
10 #include "third_party/skia/include/core/SkTypes.h" 10 #include "third_party/skia/include/core/SkTypes.h"
(...skipping 22 matching lines...) Expand all
33 } // namespace 33 } // namespace
34 34
35 PlatformDevice::PlatformDevice(const SkBitmap& bitmap) 35 PlatformDevice::PlatformDevice(const SkBitmap& bitmap)
36 : SkDevice(NULL, bitmap, /*isForLayer=*/false) { 36 : SkDevice(NULL, bitmap, /*isForLayer=*/false) {
37 } 37 }
38 38
39 bool PlatformDevice::IsNativeFontRenderingAllowed() { 39 bool PlatformDevice::IsNativeFontRenderingAllowed() {
40 return true; 40 return true;
41 } 41 }
42 42
43 CGContextRef PlatformDevice::BeginPlatformPaint() {
44 return GetBitmapContext();
45 }
46
47 void PlatformDevice::EndPlatformPaint() {
48 // Flushing will be done in onAccessBitmap.
49 }
50
43 // Set up the CGContextRef for peaceful coexistence with Skia 51 // Set up the CGContextRef for peaceful coexistence with Skia
44 void PlatformDevice::InitializeCGContext(CGContextRef context) { 52 void PlatformDevice::InitializeCGContext(CGContextRef context) {
45 // CG defaults to the same settings as Skia 53 // CG defaults to the same settings as Skia
46 } 54 }
47 55
48 // static 56 // static
49 void PlatformDevice::LoadPathToCGContext(CGContextRef context, 57 void PlatformDevice::LoadPathToCGContext(CGContextRef context,
50 const SkPath& path) { 58 const SkPath& path) {
51 // instead of a persistent attribute of the context, CG specifies the fill 59 // instead of a persistent attribute of the context, CG specifies the fill
52 // type per call, so we just have to load up the geometry. 60 // type per call, so we just have to load up the geometry.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 path.transform(transformation); 165 path.transform(transformation);
158 // TODO(playmobil): Implement. 166 // TODO(playmobil): Implement.
159 SkASSERT(false); 167 SkASSERT(false);
160 // LoadPathToDC(context, path); 168 // LoadPathToDC(context, path);
161 // hrgn = PathToRegion(context); 169 // hrgn = PathToRegion(context);
162 } 170 }
163 } 171 }
164 172
165 } // namespace skia 173 } // namespace skia
166 174
OLDNEW
« no previous file with comments | « skia/ext/platform_device_mac.h ('k') | skia/ext/platform_device_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698