1// Copyright 2013 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef CC_DEBUG_TRACED_PICTURE_H_ 6#define CC_DEBUG_TRACED_PICTURE_H_ 7 8#include <string> 9 10#include "base/debug/trace_event.h" 11#include "base/memory/scoped_ptr.h" 12#include "cc/resources/picture.h" 13 14namespace cc { 15 16class TracedPicture : public base::debug::ConvertableToTraceFormat { 17 public: 18 explicit TracedPicture(scoped_refptr<Picture>); 19 20 virtual ~TracedPicture(); 21 22 static scoped_ptr<base::debug::ConvertableToTraceFormat> 23 AsTraceablePicture(Picture* picture); 24 25 virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE; 26 27 private: 28 scoped_refptr<Picture> picture_; 29 30 DISALLOW_COPY_AND_ASSIGN(TracedPicture); 31}; 32 33} // namespace cc 34 35#endif // CC_DEBUG_TRACED_PICTURE_H_ 36