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

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

Issue 1462163002: Move uncoupled code out of skia/ext/platform_device.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-draft-metadata
Patch Set: Trim superfluous SK_API Created 5 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
« no previous file with comments | « skia/ext/platform_device.cc ('k') | skia/ext/platform_device_win.cc » ('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/platform_device.h" 5 #include "skia/ext/platform_device.h"
6 #include "skia/ext/bitmap_platform_device.h" 6 #include "skia/ext/bitmap_platform_device.h"
7 7
8 #import <ApplicationServices/ApplicationServices.h> 8 #import <ApplicationServices/ApplicationServices.h>
9 #include "skia/ext/skia_utils_mac.h" 9 #include "skia/ext/skia_utils_mac.h"
10 #include "third_party/skia/include/core/SkMatrix.h"
11 #include "third_party/skia/include/core/SkPath.h"
12 #include "third_party/skia/include/core/SkTypes.h"
13 #include "third_party/skia/include/core/SkUtils.h"
14 10
15 namespace skia { 11 namespace skia {
16 12
17 CGContextRef GetBitmapContext(SkBaseDevice* device) {
18 PlatformDevice* platform_device = GetPlatformDevice(device);
19 if (platform_device)
20 return platform_device->GetBitmapContext();
21
22 return NULL;
23 }
24
25 CGContextRef PlatformDevice::BeginPlatformPaint() { 13 CGContextRef PlatformDevice::BeginPlatformPaint() {
26 return GetBitmapContext(); 14 return GetBitmapContext();
27 } 15 }
28 16
29 void PlatformDevice::EndPlatformPaint() { 17 void PlatformDevice::EndPlatformPaint() {
30 // Flushing will be done in onAccessBitmap. 18 // Flushing will be done in onAccessBitmap.
31 } 19 }
32 20
33 } // namespace skia 21 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/platform_device.cc ('k') | skia/ext/platform_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698