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

Side by Side Diff: tests/SurfaceTest.cpp

Issue 2164363002: Add SkColorSpace to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove ':' from comment 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 unified diff | Download patch
« no previous file with comments | « tests/SpecialSurfaceTest.cpp ('k') | tests/TessellatingPathRendererTests.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 <functional> 8 #include <functional>
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 GrBackendObject textureObject = context->getGpu()->createTestingOnlyBack endTexture(nullptr, 330 GrBackendObject textureObject = context->getGpu()->createTestingOnlyBack endTexture(nullptr,
331 10, 10, kRGBA_8888_GrPixelConfig, true); 331 10, 10, kRGBA_8888_GrPixelConfig, true);
332 GrBackendTextureDesc desc; 332 GrBackendTextureDesc desc;
333 desc.fConfig = kRGBA_8888_GrPixelConfig; 333 desc.fConfig = kRGBA_8888_GrPixelConfig;
334 desc.fWidth = 10; 334 desc.fWidth = 10;
335 desc.fHeight = 10; 335 desc.fHeight = 10;
336 desc.fFlags = kRenderTarget_GrBackendTextureFlag; 336 desc.fFlags = kRenderTarget_GrBackendTextureFlag;
337 desc.fTextureHandle = textureObject; 337 desc.fTextureHandle = textureObject;
338 GrTexture* texture = context->textureProvider()->wrapBackendTexture(desc ); 338 GrTexture* texture = context->textureProvider()->wrapBackendTexture(desc );
339 { 339 {
340 auto surface(SkSurface::MakeRenderTargetDirect(texture->asRenderTarg et())); 340 auto surface(SkSurface::MakeRenderTargetDirect(texture->asRenderTarg et(), nullptr));
341 test_unique_image_snap(reporter, surface.get(), true, imageBackingSt ore, 341 test_unique_image_snap(reporter, surface.get(), true, imageBackingSt ore,
342 surfaceBackingStore); 342 surfaceBackingStore);
343 } 343 }
344 texture->unref(); 344 texture->unref();
345 context->getGpu()->deleteTestingOnlyBackendTexture(textureObject); 345 context->getGpu()->deleteTestingOnlyBackendTexture(textureObject);
346 } 346 }
347 } 347 }
348 #endif 348 #endif
349 349
350 #if SK_SUPPORT_GPU 350 #if SK_SUPPORT_GPU
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 // our surface functions. 905 // our surface functions.
906 GrRenderTarget* rt = surface->getCanvas()->internal_private_accessTo pLayerDrawContext() 906 GrRenderTarget* rt = surface->getCanvas()->internal_private_accessTo pLayerDrawContext()
907 ->accessRenderTarget(); 907 ->accessRenderTarget();
908 REPORTER_ASSERT(reporter, 908 REPORTER_ASSERT(reporter,
909 ctxInfo.grContext()->resourceProvider()->attachStenc ilAttachment(rt)); 909 ctxInfo.grContext()->resourceProvider()->attachStenc ilAttachment(rt));
910 gpu->deleteTestingOnlyBackendTexture(textureObject); 910 gpu->deleteTestingOnlyBackendTexture(textureObject);
911 } 911 }
912 } 912 }
913 } 913 }
914 #endif 914 #endif
OLDNEW
« no previous file with comments | « tests/SpecialSurfaceTest.cpp ('k') | tests/TessellatingPathRendererTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698