/* * Copyright 2013 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkCanvasStateUtils_DEFINED #define SkCanvasStateUtils_DEFINED #include "include/core/SkTypes.h" #include <memory> class SkCanvas; class SkCanvasState; /** * A set of functions that are useful for copying the state of an SkCanvas * across a library boundary where the Skia library on the other side of the * boundary may be newer. The expected usage is outline below... * * Lib Boundary * CaptureCanvasState(...) ||| * SkCanvas --> SkCanvasState ||| * ||| CreateFromCanvasState(...) * ||| SkCanvasState --> SkCanvas` * ||| Draw into SkCanvas` * ||| Unref SkCanvas` * ReleaseCanvasState(...) ||| * */ class SK_API SkCanvasStateUtils { … }; #endif