OLD | NEW |
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 #ifndef SKIA_EXT_VECTOR_PLATFORM_DEVICE_CAIRO_LINUX_H_ | 5 #ifndef SKIA_EXT_VECTOR_PLATFORM_DEVICE_CAIRO_LINUX_H_ |
6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_CAIRO_LINUX_H_ | 6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_CAIRO_LINUX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual void drawDevice(const SkDraw& draw, SkDevice*, int x, int y, | 66 virtual void drawDevice(const SkDraw& draw, SkDevice*, int x, int y, |
67 const SkPaint&) OVERRIDE; | 67 const SkPaint&) OVERRIDE; |
68 | 68 |
69 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, | 69 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, |
70 const SkClipStack&); | 70 const SkClipStack&); |
71 | 71 |
72 // Overridden from PlatformDevice | 72 // Overridden from PlatformDevice |
73 virtual PlatformSurface BeginPlatformPaint(); | 73 virtual PlatformSurface BeginPlatformPaint(); |
74 | 74 |
75 protected: | 75 protected: |
76 explicit VectorPlatformDeviceCairo(PlatformSurface context, | 76 VectorPlatformDeviceCairo(PlatformSurface context, const SkBitmap& bitmap); |
77 const SkBitmap& bitmap); | |
78 | 77 |
79 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config, int width, | 78 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config, int width, |
80 int height, bool isOpaque, | 79 int height, bool isOpaque, |
81 Usage usage); | 80 Usage usage); |
82 | 81 |
83 private: | 82 private: |
84 // Apply paint's color in the context. | 83 // Apply paint's color in the context. |
85 void ApplyPaintColor(const SkPaint& paint); | 84 void ApplyPaintColor(const SkPaint& paint); |
86 | 85 |
87 // Apply path's fill style in the context. | 86 // Apply path's fill style in the context. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 119 |
121 // Device context. | 120 // Device context. |
122 PlatformSurface context_; | 121 PlatformSurface context_; |
123 | 122 |
124 DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceCairo); | 123 DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceCairo); |
125 }; | 124 }; |
126 | 125 |
127 } // namespace skia | 126 } // namespace skia |
128 | 127 |
129 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_CAIRO_LINUX_H_ | 128 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_CAIRO_LINUX_H_ |
OLD | NEW |