| OLD | NEW |
| (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 #ifndef SKIA_EXT_PLATFORM_DEVICE_LINUX_H_ | |
| 6 #define SKIA_EXT_PLATFORM_DEVICE_LINUX_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "skia/ext/platform_device.h" | |
| 10 #include "third_party/skia/include/core/SkDevice.h" | |
| 11 | |
| 12 namespace skia { | |
| 13 | |
| 14 // Blindly copying the mac hierarchy. | |
| 15 class PlatformDevice : public SkDevice { | |
| 16 public: | |
| 17 typedef cairo_t* PlatformSurface; | |
| 18 | |
| 19 // Returns if native platform APIs are allowed to render text to this device. | |
| 20 virtual bool IsNativeFontRenderingAllowed(); | |
| 21 | |
| 22 virtual PlatformSurface BeginPlatformPaint() = 0; | |
| 23 virtual void EndPlatformPaint(); | |
| 24 | |
| 25 virtual void DrawToNativeContext(PlatformSurface surface, int x, int y, | |
| 26 const PlatformRect* src_rect ); | |
| 27 | |
| 28 // Sets the opacity of each pixel in the specified region to be opaque. | |
| 29 virtual void MakeOpaque(int x, int y, int width, int height) { } | |
| 30 | |
| 31 protected: | |
| 32 // Forwards |bitmap| to SkDevice's constructor. | |
| 33 explicit PlatformDevice(const SkBitmap& bitmap); | |
| 34 }; | |
| 35 | |
| 36 } // namespace skia | |
| 37 | |
| 38 #endif // SKIA_EXT_PLATFORM_DEVICE_LINUX_H_ | |
| OLD | NEW |