aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/HelloWorld.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-06-23 06:26:08 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-23 06:26:08 -0700
commit702edbd4bc41230902b5fe69d14d15763c27fafe (patch)
tree7c8f0cef358e47fdb1f6fcf08f9ecf830fcf4bad /example/HelloWorld.h
parent0a9af33a929f937e3630cd76c5b36d92344ee06a (diff)
Propagate SkSurfaceProps to more call sites
Start moving to a world where everyone provides surface properties. Most notably this exposes a portion of SkSurfaceProps to the C API. BUG=skia:3934 Review URL: https://codereview.chromium.org/1195003003
Diffstat (limited to 'example/HelloWorld.h')
-rw-r--r--example/HelloWorld.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/example/HelloWorld.h b/example/HelloWorld.h
index a1508c582d..ef4e417ad6 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);