Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1877)

Unified Diff: skia/ext/platform_picture_skia.h

Issue 10915065: Add PlatformPictureSkia and RecordingPlatformDeviceSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix SkProxyCanvas leak Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: skia/ext/platform_picture_skia.h
diff --git a/skia/ext/platform_picture_skia.h b/skia/ext/platform_picture_skia.h
new file mode 100644
index 0000000000000000000000000000000000000000..dab71777009bd6c17e4418f4d28f457051b36bbd
--- /dev/null
+++ b/skia/ext/platform_picture_skia.h
@@ -0,0 +1,34 @@
+// 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.
+
+#ifndef SKIA_EXT_PLATFORM_PICTURE_SKIA_H_
+#define SKIA_EXT_PLATFORM_PICTURE_SKIA_H_
+
+#include "base/basictypes.h"
+#include "third_party/skia/include/core/SkPicture.h"
+
+class SkCanvas;
+class SkProxyCanvas;
+
+namespace skia {
+
+class SK_API PlatformPictureSkia {
+ public:
+ PlatformPictureSkia();
+ ~PlatformPictureSkia();
+
+ SkCanvas* beginRecording(int width, int height);
+ void endRecording();
+ void drawPicture(SkCanvas* canvas);
alokp 2012/09/20 15:47:51 I think a better name for this function would be d
reveman 2012/09/20 17:01:26 I agree. That's much better!
+
+ private:
+ SkPicture picture_;
reed1 2012/09/20 13:42:28 We are desperately trying to remove SkRefPtr from
reveman 2012/09/20 17:01:26 ok, np.
+ SkRefPtr<SkProxyCanvas> record_;
+
+ DISALLOW_COPY_AND_ASSIGN(PlatformPictureSkia);
+};
+
+} // namespace skia
+
+#endif // SKIA_EXT_PLATFORM_PICTURE_SKIA_H_

Powered by Google App Engine
This is Rietveld 408576698