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

Unified Diff: src/core/SkPictureRecord.cpp

Issue 154163002: remove SkCanvas::createCompatibleDevice, and add SkCanvas::newSurface (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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: src/core/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 4279ac3c2c2cc696f165b5cf2f6c67e1402fa314..665ba5df0bc858a946b1ffdb6e7ece8590b12081 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -1,10 +1,10 @@
-
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+
#include "SkPictureRecord.h"
#include "SkTSearch.h"
#include "SkPixelRef.h"
@@ -12,6 +12,7 @@
#include "SkBBoxHierarchy.h"
#include "SkDevice.h"
#include "SkPictureStateTree.h"
+#include "SkSurface.h"
#define HEAP_BLOCK_SIZE 4096
@@ -1279,6 +1280,10 @@ void SkPictureRecord::endCommentGroup() {
///////////////////////////////////////////////////////////////////////////////
+SkSurface* SkPictureRecord::onNewSurface(const SkImageInfo& info) {
+ return SkSurface::NewPicture(info.fWidth, info.fHeight);
+}
+
void SkPictureRecord::addBitmap(const SkBitmap& bitmap) {
const int index = fBitmapHeap->insert(bitmap);
// In debug builds, a bad return value from insert() will crash, allowing for debugging. In

Powered by Google App Engine
This is Rietveld 408576698