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

Side by Side Diff: tests/SpecialSurfaceTest.cpp

Issue 1913743002: Add another dollop of sk_sp to SkSpecialImage and SkSpecialSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rm std::move Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « tests/SpecialImageTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file 5 * found in the LICENSE file
6 */ 6 */
7 7
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkSpecialImage.h" 9 #include "SkSpecialImage.h"
10 #include "SkSpecialSurface.h" 10 #include "SkSpecialSurface.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 // test the more flexible factory 93 // test the more flexible factory
94 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SpecialSurface_Gpu2, reporter, ctxInfo) { 94 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SpecialSurface_Gpu2, reporter, ctxInfo) {
95 GrSurfaceDesc desc; 95 GrSurfaceDesc desc;
96 desc.fConfig = kSkia8888_GrPixelConfig; 96 desc.fConfig = kSkia8888_GrPixelConfig;
97 desc.fFlags = kRenderTarget_GrSurfaceFlag; 97 desc.fFlags = kRenderTarget_GrSurfaceFlag;
98 desc.fWidth = kFullSize; 98 desc.fWidth = kFullSize;
99 desc.fHeight = kFullSize; 99 desc.fHeight = kFullSize;
100 100
101 SkAutoTUnref<GrTexture> temp(ctxInfo.fGrContext->textureProvider()->createAp proxTexture(desc)); 101 sk_sp<GrTexture> temp(ctxInfo.fGrContext->textureProvider()->createApproxTex ture(desc));
102 SkASSERT_RELEASE(temp); 102 SkASSERT_RELEASE(temp);
103 103
104 const SkIRect subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerS ize); 104 const SkIRect subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerS ize);
105 105
106 sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeFromTexture(subset, temp) ); 106 sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeFromTexture(subset, std:: move(temp)));
107 107
108 test_surface(surf, reporter, kPad); 108 test_surface(surf, reporter, kPad);
109 109
110 // TODO: check that the clear didn't escape the active region 110 // TODO: check that the clear didn't escape the active region
111 } 111 }
112 112
113 #endif 113 #endif
OLDNEW
« no previous file with comments | « tests/SpecialImageTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698