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

Unified Diff: src/core/SkSpecialSurface.cpp

Issue 2163323002: Add desired width & height to drawContext (as opposed to using the width & height of the RT) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More Clean up Created 4 years, 5 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 | « include/gpu/GrDrawContext.h ('k') | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSpecialSurface.cpp
diff --git a/src/core/SkSpecialSurface.cpp b/src/core/SkSpecialSurface.cpp
index 510926a1f5db508b429ee55dc97ddface3629422..6f99462ef15113e7e7c94a0503f4dc5b459e0209 100644
--- a/src/core/SkSpecialSurface.cpp
+++ b/src/core/SkSpecialSurface.cpp
@@ -115,13 +115,11 @@ sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRaster(const SkImageInfo& info,
class SkSpecialSurface_Gpu : public SkSpecialSurface_Base {
public:
- SkSpecialSurface_Gpu(sk_sp<GrDrawContext> drawContext,
- int width, int height,
- const SkIRect& subset)
+ SkSpecialSurface_Gpu(sk_sp<GrDrawContext> drawContext, const SkIRect& subset)
: INHERITED(subset, &drawContext->surfaceProps())
, fDrawContext(std::move(drawContext)) {
- sk_sp<SkBaseDevice> device(SkGpuDevice::Make(fDrawContext, width, height,
+ sk_sp<SkBaseDevice> device(SkGpuDevice::Make(fDrawContext,
SkGpuDevice::kUninit_InitContents));
if (!device) {
return;
@@ -166,7 +164,7 @@ sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRenderTarget(GrContext* context,
const SkIRect subset = SkIRect::MakeWH(width, height);
- return sk_make_sp<SkSpecialSurface_Gpu>(std::move(drawContext), width, height, subset);
+ return sk_make_sp<SkSpecialSurface_Gpu>(std::move(drawContext), subset);
}
#endif
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698