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

Side by Side Diff: tests/GrSurfaceTest.cpp

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 years, 1 month 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/GrPorterDuffTest.cpp ('k') | tests/ImageTest.cpp » ('j') | 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 2013 Google Inc. 2 * Copyright 2013 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 "SkTypes.h" 8 #include "SkTypes.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 GrBackendObject backendTex = context->getGpu()->createTestingOnlyBackendText ure( 47 GrBackendObject backendTex = context->getGpu()->createTestingOnlyBackendText ure(
48 nullptr, 256, 256, kRGBA_8888_GrPixelConfig); 48 nullptr, 256, 256, kRGBA_8888_GrPixelConfig);
49 49
50 GrBackendTextureDesc backendDesc; 50 GrBackendTextureDesc backendDesc;
51 backendDesc.fConfig = kRGBA_8888_GrPixelConfig; 51 backendDesc.fConfig = kRGBA_8888_GrPixelConfig;
52 backendDesc.fFlags = kRenderTarget_GrBackendTextureFlag; 52 backendDesc.fFlags = kRenderTarget_GrBackendTextureFlag;
53 backendDesc.fWidth = 256; 53 backendDesc.fWidth = 256;
54 backendDesc.fHeight = 256; 54 backendDesc.fHeight = 256;
55 backendDesc.fSampleCnt = 0; 55 backendDesc.fSampleCnt = 0;
56 backendDesc.fTextureHandle = backendTex; 56 backendDesc.fTextureHandle = backendTex;
57 GrSurface* texRT2 = context->textureProvider()->wrapBackendTexture( 57 sk_sp<GrSurface> texRT2 = context->textureProvider()->wrapBackendTexture(
58 backendDesc, kBorrow_GrWrapOwnership); 58 backendDesc, kBorrow_GrWrapOwnership);
59 REPORTER_ASSERT(reporter, texRT2 == texRT2->asRenderTarget()); 59 REPORTER_ASSERT(reporter, texRT2.get() == texRT2->asRenderTarget());
60 REPORTER_ASSERT(reporter, texRT2 == texRT2->asTexture()); 60 REPORTER_ASSERT(reporter, texRT2.get() == texRT2->asTexture());
61 REPORTER_ASSERT(reporter, static_cast<GrSurface*>(texRT2->asRenderTarget()) == 61 REPORTER_ASSERT(reporter, static_cast<GrSurface*>(texRT2->asRenderTarget()) ==
62 texRT2->asTexture()); 62 texRT2->asTexture());
63 REPORTER_ASSERT(reporter, texRT2->asRenderTarget() == 63 REPORTER_ASSERT(reporter, texRT2->asRenderTarget() ==
64 static_cast<GrSurface*>(texRT2->asTexture())); 64 static_cast<GrSurface*>(texRT2->asTexture()));
65 REPORTER_ASSERT(reporter, static_cast<GrSurface*>(texRT2->asRenderTarget()) == 65 REPORTER_ASSERT(reporter, static_cast<GrSurface*>(texRT2->asRenderTarget()) ==
66 static_cast<GrSurface*>(texRT2->asTexture())); 66 static_cast<GrSurface*>(texRT2->asTexture()));
67 67
68 texRT1->unref(); 68 texRT1->unref();
69 texRT2->unref();
70 tex1->unref(); 69 tex1->unref();
71 context->getGpu()->deleteTestingOnlyBackendTexture(backendTex); 70 context->getGpu()->deleteTestingOnlyBackendTexture(backendTex);
72 } 71 }
73 72
74 #endif 73 #endif
OLDNEW
« no previous file with comments | « tests/GrPorterDuffTest.cpp ('k') | tests/ImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698