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

Unified Diff: src/image/SkSurface_Raster.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/image/SkSurface_Gpu.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface_Raster.cpp
diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp
index cd4f049c4166be5dd76edc6bf4534cd9b96771db..13f215589f190f9aa0cbb2d45ac5a1ff841c83e6 100644
--- a/src/image/SkSurface_Raster.cpp
+++ b/src/image/SkSurface_Raster.cpp
@@ -18,9 +18,8 @@
static bool Valid(const SkImageInfo&, size_t rb = kIgnoreRowBytesValue);
SkSurface_Raster(const SkImageInfo&, void*, size_t rb,
- void (*releaseProc)(void* pixels, void* context), void* context,
- const SkSurfaceProps*);
- SkSurface_Raster(SkPixelRef*, const SkSurfaceProps*);
+ void (*releaseProc)(void* pixels, void* context), void* context);
+ SkSurface_Raster(SkPixelRef*);
virtual SkCanvas* onNewCanvas() SK_OVERRIDE;
virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE;
@@ -79,16 +78,15 @@
}
SkSurface_Raster::SkSurface_Raster(const SkImageInfo& info, void* pixels, size_t rb,
- void (*releaseProc)(void* pixels, void* context), void* context,
- const SkSurfaceProps* props)
- : INHERITED(info, props)
+ void (*releaseProc)(void* pixels, void* context), void* context)
+ : INHERITED(info)
{
fBitmap.installPixels(info, pixels, rb, NULL, releaseProc, context);
fWeOwnThePixels = false; // We are "Direct"
}
-SkSurface_Raster::SkSurface_Raster(SkPixelRef* pr, const SkSurfaceProps* props)
- : INHERITED(pr->info().width(), pr->info().height(), props)
+SkSurface_Raster::SkSurface_Raster(SkPixelRef* pr)
+ : INHERITED(pr->info().width(), pr->info().height())
{
const SkImageInfo& info = pr->info();
@@ -102,7 +100,7 @@
}
SkCanvas* SkSurface_Raster::onNewCanvas() {
- return SkNEW_ARGS(SkCanvas, (fBitmap, this->props()));
+ return SkNEW_ARGS(SkCanvas, (fBitmap));
}
SkSurface* SkSurface_Raster::onNewSurface(const SkImageInfo& info) {
@@ -142,7 +140,7 @@
SkSurface* SkSurface::NewRasterDirectReleaseProc(const SkImageInfo& info, void* pixels, size_t rb,
void (*releaseProc)(void* pixels, void* context),
- void* context, const SkSurfaceProps* props) {
+ void* context) {
if (NULL == releaseProc) {
context = NULL;
}
@@ -153,15 +151,14 @@
return NULL;
}
- return SkNEW_ARGS(SkSurface_Raster, (info, pixels, rb, releaseProc, context, props));
+ return SkNEW_ARGS(SkSurface_Raster, (info, pixels, rb, releaseProc, context));
}
-SkSurface* SkSurface::NewRasterDirect(const SkImageInfo& info, void* pixels, size_t rowBytes,
- const SkSurfaceProps* props) {
- return NewRasterDirectReleaseProc(info, pixels, rowBytes, NULL, NULL, props);
+SkSurface* SkSurface::NewRasterDirect(const SkImageInfo& info, void* pixels, size_t rowBytes) {
+ return NewRasterDirectReleaseProc(info, pixels, rowBytes, NULL, NULL);
}
-SkSurface* SkSurface::NewRaster(const SkImageInfo& info, const SkSurfaceProps* props) {
+SkSurface* SkSurface::NewRaster(const SkImageInfo& info) {
if (!SkSurface_Raster::Valid(info)) {
return NULL;
}
@@ -170,5 +167,5 @@
if (NULL == pr.get()) {
return NULL;
}
- return SkNEW_ARGS(SkSurface_Raster, (pr, props));
+ return SkNEW_ARGS(SkSurface_Raster, (pr));
}
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698