blob: 9bab4193d354a43946edaba275a58f6ed6fa974c [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
reed@google.comac10a2d2010-12-22 21:39:39 +00002/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00003 * Copyright 2010 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
reed@google.comac10a2d2010-12-22 21:39:39 +00007 */
8
9
epoger@google.comec3ed6a2011-07-28 14:26:00 +000010
reed@google.comac10a2d2010-12-22 21:39:39 +000011#include "GrTypes.h"
12
13#include <stdarg.h>
14#include <stdio.h>
15
16#include "SkTypes.h"
17
18void GrPrintf(const char format[], ...) {
senorblanco@chromium.orgef3913b2011-05-19 17:11:07 +000019 const size_t MAX_BUFFER_SIZE = 2048;
reed@google.comac10a2d2010-12-22 21:39:39 +000020
21 char buffer[MAX_BUFFER_SIZE + 1];
22 va_list args;
23
24 va_start(args, format);
25 vsnprintf(buffer, MAX_BUFFER_SIZE, format, args);
26 va_end(args);
27
28 // skia has already mapped this to do the "right thing"
29 SkDebugf("%s", buffer);
30}
31
32