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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 583773004: Revert of introduce Props to surface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | src/image/SkSurface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 7ce3446b72e59289f8741fd20bf8355ae3bfd4a3..02dca83ee0e86892a1a2d4fd267d17d8f465bb52 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -133,15 +133,15 @@
///////////////////////////////////////////////////////////////////////////////
-SkGpuDevice* SkGpuDevice::Create(GrSurface* surface, const SkSurfaceProps& props, unsigned flags) {
+SkGpuDevice* SkGpuDevice::Create(GrSurface* surface, unsigned flags) {
SkASSERT(surface);
if (NULL == surface->asRenderTarget() || surface->wasDestroyed()) {
return NULL;
}
- return SkNEW_ARGS(SkGpuDevice, (surface, props, flags));
-}
-
-SkGpuDevice::SkGpuDevice(GrSurface* surface, const SkSurfaceProps& props, unsigned flags) {
+ return SkNEW_ARGS(SkGpuDevice, (surface, flags));
+}
+
+SkGpuDevice::SkGpuDevice(GrSurface* surface, unsigned flags) {
fDrawProcs = NULL;
@@ -156,15 +156,13 @@
fLegacyBitmap.setInfo(surface->info());
fLegacyBitmap.setPixelRef(pr)->unref();
- this->setPixelGeometry(props.pixelGeometry());
-
bool useDFFonts = !!(flags & kDFFonts_Flag);
fMainTextContext = fContext->createTextContext(fRenderTarget, this->getLeakyProperties(), useDFFonts);
fFallbackTextContext = SkNEW_ARGS(GrBitmapTextContext, (fContext, this->getLeakyProperties()));
}
SkGpuDevice* SkGpuDevice::Create(GrContext* context, const SkImageInfo& origInfo,
- const SkSurfaceProps& props, int sampleCount) {
+ int sampleCount) {
if (kUnknown_SkColorType == origInfo.colorType() ||
origInfo.width() < 0 || origInfo.height() < 0) {
return NULL;
@@ -196,7 +194,7 @@
return NULL;
}
- return SkNEW_ARGS(SkGpuDevice, (texture.get(), props));
+ return SkNEW_ARGS(SkGpuDevice, (texture.get()));
}
SkGpuDevice::~SkGpuDevice() {
@@ -1807,7 +1805,7 @@
texture.reset(fContext->createUncachedTexture(desc, NULL, 0));
#endif
if (texture.get()) {
- return SkGpuDevice::Create(texture, SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType), flags);
+ return SkGpuDevice::Create(texture, flags);
} else {
GrPrintf("---- failed to create compatible device texture [%d %d]\n",
info.width(), info.height());
@@ -1815,8 +1813,8 @@
}
}
-SkSurface* SkGpuDevice::newSurface(const SkImageInfo& info, const SkSurfaceProps& props) {
- return SkSurface::NewRenderTarget(fContext, info, fRenderTarget->numSamples(), &props);
+SkSurface* SkGpuDevice::newSurface(const SkImageInfo& info) {
+ return SkSurface::NewRenderTarget(fContext, info, fRenderTarget->numSamples());
}
void SkGpuDevice::EXPERIMENTAL_optimize(const SkPicture* picture) {
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | src/image/SkSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698