Flutter Engine
The Flutter Engine
Functions
SkNullCanvas.cpp File Reference
#include "include/utils/SkNullCanvas.h"
#include "include/core/SkCanvas.h"
#include "include/utils/SkNWayCanvas.h"

Go to the source code of this file.

Functions

std::unique_ptr< SkCanvasSkMakeNullCanvas ()
 

Function Documentation

◆ SkMakeNullCanvas()

std::unique_ptr< SkCanvas > SkMakeNullCanvas ( )

Creates a canvas that draws nothing. This is useful for performance testing.

Definition at line 13 of file SkNullCanvas.cpp.

13 {
14 // An N-Way canvas forwards calls to N canvas's. When N == 0 it's
15 // effectively a null canvas.
16 return std::unique_ptr<SkCanvas>(new SkNWayCanvas(0, 0));
17}