diff options
author | 2016-07-26 11:38:17 -0700 | |
---|---|---|
committer | 2016-07-26 11:38:17 -0700 | |
commit | 7e922765545f42ce691e4f3d5fbbd4e44ba47ff1 (patch) | |
tree | 40f15d00e25acaf015f46e45d11d1858eb3b8cf6 /include/core/SkSurface.h | |
parent | 3a0dbde1cfa84b08c7dd5b597142e9f6179f2d07 (diff) |
Reduce usage of MakeRenderTargetDirect
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187573002
Review-Url: https://codereview.chromium.org/2187573002
Diffstat (limited to 'include/core/SkSurface.h')
-rw-r--r-- | include/core/SkSurface.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h index 4d38d300c9..e60f50e3fa 100644 --- a/include/core/SkSurface.h +++ b/include/core/SkSurface.h @@ -140,11 +140,19 @@ public: * Return a new surface whose contents will be drawn to an offscreen * render target, allocated by the surface. */ - static sk_sp<SkSurface> MakeRenderTarget( - GrContext*, SkBudgeted, const SkImageInfo&, int sampleCount, const SkSurfaceProps*); + static sk_sp<SkSurface> MakeRenderTarget(GrContext*, SkBudgeted, const SkImageInfo&, + int sampleCount, GrSurfaceOrigin, + const SkSurfaceProps*); + + static sk_sp<SkSurface> MakeRenderTarget(GrContext* context, SkBudgeted budgeted, + const SkImageInfo& info, int sampleCount, + const SkSurfaceProps* props) { + return MakeRenderTarget(context, budgeted, info, sampleCount, + kBottomLeft_GrSurfaceOrigin, props); + } static sk_sp<SkSurface> MakeRenderTarget(GrContext* gr, SkBudgeted b, const SkImageInfo& info) { - return MakeRenderTarget(gr, b, info, 0, nullptr); + return MakeRenderTarget(gr, b, info, 0, kBottomLeft_GrSurfaceOrigin, nullptr); } #ifdef SK_SUPPORT_LEGACY_NEW_SURFACE_API |