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

Unified Diff: src/gpu/SkGpuDevice.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/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index da56009c55b823927100dabebd0c1340bfd3beef..8c272f947abc60fa3d648d9a1459a33531c61e1a 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -27,6 +27,7 @@
#include "SkPathEffect.h"
#include "SkRRect.h"
#include "SkStroke.h"
+#include "SkSurface.h"
#include "SkTLazy.h"
#include "SkUtils.h"
#include "SkErrorInternals.h"
@@ -1913,6 +1914,10 @@ SkBaseDevice* SkGpuDevice::onCreateCompatibleDevice(SkBitmap::Config config,
}
}
+SkSurface* SkGpuDevice::newSurface(const SkImageInfo& info) {
+ return SkSurface::NewRenderTarget(fContext, info, fRenderTarget->numSamples());
+}
+
SkGpuDevice::SkGpuDevice(GrContext* context,
GrTexture* texture,
bool needClear)

Powered by Google App Engine
This is Rietveld 408576698