aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPrintf_skia.cpp
blob: 9bab4193d354a43946edaba275a58f6ed6fa974c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

/*
 * Copyright 2010 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */



#include "GrTypes.h"

#include <stdarg.h>
#include <stdio.h>

#include "SkTypes.h"

void GrPrintf(const char format[], ...) {
    const size_t MAX_BUFFER_SIZE = 2048;

    char buffer[MAX_BUFFER_SIZE + 1];
    va_list args;

    va_start(args, format);
    vsnprintf(buffer, MAX_BUFFER_SIZE, format, args);
    va_end(args);

    // skia has already mapped this to do the "right thing"
    SkDebugf("%s", buffer);
}