5df4934b3e
Changes over original:
- conditionalize ownership in SkPictureRecorder
- conditionalize ownership in SkCanvasStateUtils
This reverts commit b613c266df
.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4742
Change-Id: Ib25514d6f546c69b6650b5c957403b04f7380dc2
Reviewed-on: https://skia-review.googlesource.com/4742
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
27 lines
533 B
C++
27 lines
533 B
C++
/*
|
|
* Copyright 2012 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef SkNullCanvas_DEFINED
|
|
#define SkNullCanvas_DEFINED
|
|
|
|
#include "SkBitmap.h"
|
|
|
|
class SkCanvas;
|
|
|
|
/**
|
|
* Creates a canvas that draws nothing. This is useful for performance testing.
|
|
*/
|
|
SK_API std::unique_ptr<SkCanvas> SkMakeNullCanvas();
|
|
|
|
#ifdef SK_SUPPORT_LEGACY_CANVAS_IS_REFCNT
|
|
static inline SkCanvas* SkCreateNullCanvas() {
|
|
return SkMakeNullCanvas().release();
|
|
}
|
|
#endif
|
|
|
|
#endif
|