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

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

Issue 7633040: CL removing inheritance of SkDevice from PlatformDevice. Flavours of PlatformDevice classes now ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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.h ('k') | skia/ext/platform_device_linux.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) 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 "skia/ext/platform_device.h" 5 #include "skia/ext/platform_device.h"
6 6
7 #include "third_party/skia/include/core/SkMetaData.h" 7 #include "third_party/skia/include/core/SkMetaData.h"
8 8
9 namespace skia { 9 namespace skia {
10 10
11 namespace { 11 namespace {
12 const char* kDevicePlatformBehaviour = "CrDevicePlatformBehaviour"; 12 const char* kDevicePlatformBehaviour = "CrDevicePlatformBehaviour";
13 } 13 }
14 14
15 void SetPlatformDevice(SkDevice* device, PlatformDevice* platform_behaviour) { 15 void SetPlatformDevice(SkDevice* device, PlatformDevice* platform_behaviour) {
16 SkMetaData& meta_data = device->getMetaData(); 16 SkMetaData& meta_data = device->getMetaData();
17 meta_data.setPtr(kDevicePlatformBehaviour, platform_behaviour); 17 meta_data.setPtr(kDevicePlatformBehaviour, platform_behaviour);
18 } 18 }
19 19
20 PlatformDevice* GetPlatformDevice(SkDevice* device) { 20 PlatformDevice* GetPlatformDevice(SkDevice* device) {
21 SkMetaData& meta_data = device->getMetaData(); 21 SkMetaData& meta_data = device->getMetaData();
22 PlatformDevice* device_behaviour = NULL; 22 PlatformDevice* device_behaviour = NULL;
23 if (meta_data.findPtr(kDevicePlatformBehaviour, 23 if (meta_data.findPtr(kDevicePlatformBehaviour,
24 reinterpret_cast<void**>(&device_behaviour))) 24 reinterpret_cast<void**>(&device_behaviour)))
25 return device_behaviour; 25 return device_behaviour;
26 26
27 return NULL; 27 return NULL;
28 } 28 }
29 29
30 bool PlatformDevice::IsNativeFontRenderingAllowed() {
31 return true;
32 }
33
34 bool PlatformDevice::AlphaBlendUsed() const {
35 return false;
36 }
37
30 } // namespace skia 38 } // namespace skia
31
OLDNEW
« no previous file with comments | « skia/ext/platform_device.h ('k') | skia/ext/platform_device_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698