Flutter Engine
The Flutter Engine
Functions
SkNullCanvas.h File Reference
#include "include/core/SkTypes.h"
#include <memory>

Go to the source code of this file.

Functions

SK_API std::unique_ptr< SkCanvasSkMakeNullCanvas ()
 

Function Documentation

◆ SkMakeNullCanvas()

SK_API 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}