blob: 8db09158576e66644f93213156bdbcf89d1d938c [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cc/paint/paint_canvas.h"
#include "printing/printing_export.h"
#include "third_party/skia/include/core/SkRefCnt.h"
namespace printing {
class MetafileSkia;
// A wrapper class with static methods to set and retrieve a MetafileSkia
// on an SkCanvas. The ownership of the metafile is not affected and it
// is the caller's responsibility to ensure that the metafile remains valid
// as long as the canvas.
class PRINTING_EXPORT MetafileSkiaWrapper : public SkRefCnt {
static void SetMetafileOnCanvas(cc::PaintCanvas* canvas,
MetafileSkia* metafile);
static MetafileSkia* GetMetafileFromCanvas(cc::PaintCanvas* canvas);
explicit MetafileSkiaWrapper(MetafileSkia* metafile);
MetafileSkia* metafile_;
} // namespace printing