Index: skia/ext/platform_canvas_linux.cc |
diff --git a/skia/ext/platform_canvas_linux.cc b/skia/ext/platform_canvas_linux.cc |
index 5c14707701806d73249df57bf08b0a45b4605ba9..d436fd765c2784788d7fb64e0f811b72d4144774 100644 |
--- a/skia/ext/platform_canvas_linux.cc |
+++ b/skia/ext/platform_canvas_linux.cc |
@@ -8,6 +8,8 @@ |
#include "skia/ext/bitmap_platform_device_linux.h" |
#include "SkTypes.h" |
+#include <cairo/cairo.h> |
+ |
namespace skia { |
PlatformCanvasLinux::PlatformCanvasLinux() : SkCanvas() { |
@@ -52,4 +54,9 @@ SkDevice* PlatformCanvasLinux::createPlatformDevice(int width, |
return BitmapPlatformDeviceLinux::Create(width, height, is_opaque); |
} |
+// static |
+size_t PlatformCanvasLinux::StrideForWidth(unsigned width) { |
+ return cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width); |
+} |
+ |
} // namespace skia |