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

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

Issue 2629193002: Remove skia::PlatformDevice (Closed)
Patch Set: also remove SK_SUPPORT_LEGACY_GETTOPDEVICE Created 3 years, 11 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
« no previous file with comments | « skia/ext/platform_device.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "skia/ext/platform_device.h"
7
8 #include "third_party/skia/include/core/SkMetaData.h"
9
10 namespace {
11
12 const char kDevicePlatformBehaviour[] = "CrDevicePlatformBehaviour";
13
14 } // namespace
15
16 namespace skia {
17
18 void SetPlatformDevice(SkBaseDevice* device, PlatformDevice* platform_behaviour) {
19 SkMetaData& meta_data = device->getMetaData();
20 meta_data.setPtr(kDevicePlatformBehaviour, platform_behaviour);
21 }
22
23 PlatformDevice* GetPlatformDevice(SkBaseDevice* device) {
24 if (device) {
25 SkMetaData& meta_data = device->getMetaData();
26 PlatformDevice* device_behaviour = NULL;
27 if (meta_data.findPtr(kDevicePlatformBehaviour,
28 reinterpret_cast<void**>(&device_behaviour)))
29 return device_behaviour;
30 }
31 return NULL;
32 }
33
34 PlatformDevice::~PlatformDevice() {}
35
36 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/platform_device.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698