| 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 #include "skia/ext/vector_platform_device_cairo_linux.h" | 5 #include "skia/ext/vector_platform_device_cairo_linux.h" |
| 6 | 6 |
| 7 #include <cairo.h> | 7 #include <cairo.h> |
| 8 #include <cairo-ft.h> | 8 #include <cairo-ft.h> |
| 9 | 9 |
| 10 #include <ft2build.h> | 10 #include <ft2build.h> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 SkDeviceFactory* VectorPlatformDeviceCairo::getDeviceFactory() { | 132 SkDeviceFactory* VectorPlatformDeviceCairo::getDeviceFactory() { |
| 133 return SkNEW(VectorPlatformDeviceCairoFactory); | 133 return SkNEW(VectorPlatformDeviceCairoFactory); |
| 134 } | 134 } |
| 135 | 135 |
| 136 bool VectorPlatformDeviceCairo::IsVectorial() { | 136 bool VectorPlatformDeviceCairo::IsVectorial() { |
| 137 return true; | 137 return true; |
| 138 } | 138 } |
| 139 | 139 |
| 140 PlatformDevice::PlatformSurface | 140 PlatformDevice::PlatformSurface |
| 141 VectorPlatformDeviceCairo::beginPlatformPaint() { | 141 VectorPlatformDeviceCairo::BeginPlatformPaint() { |
| 142 return context_; | 142 return context_; |
| 143 } | 143 } |
| 144 | 144 |
| 145 void VectorPlatformDeviceCairo::drawBitmap(const SkDraw& draw, | 145 void VectorPlatformDeviceCairo::drawBitmap(const SkDraw& draw, |
| 146 const SkBitmap& bitmap, | 146 const SkBitmap& bitmap, |
| 147 const SkIRect* srcRectOrNull, | 147 const SkIRect* srcRectOrNull, |
| 148 const SkMatrix& matrix, | 148 const SkMatrix& matrix, |
| 149 const SkPaint& paint) { | 149 const SkPaint& paint) { |
| 150 SkASSERT(bitmap.getConfig() == SkBitmap::kARGB_8888_Config); | 150 SkASSERT(bitmap.getConfig() == SkBitmap::kARGB_8888_Config); |
| 151 | 151 |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 DCHECK(it->second.font_stream); | 701 DCHECK(it->second.font_stream); |
| 702 | 702 |
| 703 cairo_font_face_destroy(it->second.cairo_face); | 703 cairo_font_face_destroy(it->second.cairo_face); |
| 704 // |it->second.ft_face| is handled by Cairo. | 704 // |it->second.ft_face| is handled by Cairo. |
| 705 it->second.font_stream->unref(); | 705 it->second.font_stream->unref(); |
| 706 } | 706 } |
| 707 g_font_cache->clear(); | 707 g_font_cache->clear(); |
| 708 } | 708 } |
| 709 | 709 |
| 710 } // namespace skia | 710 } // namespace skia |
| OLD | NEW |