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

Unified Diff: example/HelloWorld.h

Issue 1195003003: Propagate SkSurfaceProps to more call sites (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | gm/cgm.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: example/HelloWorld.h
diff --git a/example/HelloWorld.h b/example/HelloWorld.h
index a1508c582d12b90c38fb70980be22ab348c48f4f..ef4e417ad62b60b5a93b1ed6f2f80955f8bb02a5 100644
--- a/example/HelloWorld.h
+++ b/example/HelloWorld.h
@@ -34,14 +34,14 @@ public:
protected:
SkSurface* createSurface() override {
+ SkSurfaceProps props(INHERITED::getSurfaceProps());
if (kGPU_DeviceType == fType) {
- SkSurfaceProps props(INHERITED::getSurfaceProps());
return SkSurface::NewRenderTargetDirect(fRenderTarget, &props);
}
static const SkImageInfo info = SkImageInfo::MakeN32Premul(
SkScalarRoundToInt(this->width()), SkScalarRoundToInt(this->height()));
- return fSurface = SkSurface::NewRaster(info);
- }
+ return fSurface = SkSurface::NewRaster(info, &props);
+ }
void draw(SkCanvas* canvas) override;
void drawContents(SkCanvas* canvas);
« no previous file with comments | « no previous file | gm/cgm.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698