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

Side by Side Diff: tests/ImageTest.cpp

Issue 1845923004: Rename enums in GrContextFactory to remove "GL" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/GrPorterDuffTest.cpp ('k') | tests/SkpSkGrTest.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 2015 Google Inc. 2 * Copyright 2015 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 <initializer_list> 9 #include <initializer_list>
10 #include "DMGpuSupport.h" 10 #include "DMGpuSupport.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 image.reset(nullptr); 400 image.reset(nullptr);
401 { 401 {
402 SkBitmap cachedBitmap; 402 SkBitmap cachedBitmap;
403 REPORTER_ASSERT(reporter, !SkBitmapCache::Find(uniqueID, &cachedBitmap)) ; 403 REPORTER_ASSERT(reporter, !SkBitmapCache::Find(uniqueID, &cachedBitmap)) ;
404 } 404 }
405 } 405 }
406 406
407 DEF_GPUTEST_FOR_NATIVE_CONTEXT(SkImage_newTextureImage, reporter, context, glCon text) { 407 DEF_GPUTEST_FOR_NATIVE_CONTEXT(SkImage_newTextureImage, reporter, context, glCon text) {
408 GrContextFactory otherFactory; 408 GrContextFactory otherFactory;
409 GrContextFactory::ContextInfo otherContextInfo = 409 GrContextFactory::ContextInfo otherContextInfo =
410 otherFactory.getContextInfo(GrContextFactory::kNative_GLContextType); 410 otherFactory.getContextInfo(GrContextFactory::kNativeGL_ContextType);
411 glContext->makeCurrent(); 411 glContext->makeCurrent();
412 412
413 std::function<sk_sp<SkImage>()> imageFactories[] = { 413 std::function<sk_sp<SkImage>()> imageFactories[] = {
414 create_image, 414 create_image,
415 create_codec_image, 415 create_codec_image,
416 create_data_image, 416 create_data_image,
417 // Create an image from a picture. 417 // Create an image from a picture.
418 create_picture_image, 418 create_picture_image,
419 // Create a texture image. 419 // Create a texture image.
420 [context] { return create_gpu_image(context); }, 420 [context] { return create_gpu_image(context); },
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 } 818 }
819 } 819 }
820 } 820 }
821 } 821 }
822 822
823 DEF_GPUTEST_FOR_NATIVE_CONTEXT(DeferredTextureImage, reporter, context, glContex t) { 823 DEF_GPUTEST_FOR_NATIVE_CONTEXT(DeferredTextureImage, reporter, context, glContex t) {
824 SkAutoTUnref<GrContextThreadSafeProxy> proxy(context->threadSafeProxy()); 824 SkAutoTUnref<GrContextThreadSafeProxy> proxy(context->threadSafeProxy());
825 825
826 GrContextFactory otherFactory; 826 GrContextFactory otherFactory;
827 GrContextFactory::ContextInfo otherContextInfo = 827 GrContextFactory::ContextInfo otherContextInfo =
828 otherFactory.getContextInfo(GrContextFactory::kNative_GLContextType); 828 otherFactory.getContextInfo(GrContextFactory::kNativeGL_ContextType);
829 829
830 glContext->makeCurrent(); 830 glContext->makeCurrent();
831 REPORTER_ASSERT(reporter, proxy); 831 REPORTER_ASSERT(reporter, proxy);
832 struct { 832 struct {
833 std::function<sk_sp<SkImage> ()> fImageFactory; 833 std::function<sk_sp<SkImage> ()> fImageFactory;
834 bool fExpectation; 834 bool fExpectation;
835 } testCases[] = { 835 } testCases[] = {
836 { create_image, true }, 836 { create_image, true },
837 { create_codec_image, true }, 837 { create_codec_image, true },
838 { create_data_image, true }, 838 { create_data_image, true },
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 otherContextInfo.fGrContext, buffer, budgeted)); 885 otherContextInfo.fGrContext, buffer, budgeted));
886 REPORTER_ASSERT(reporter, !newImage2); 886 REPORTER_ASSERT(reporter, !newImage2);
887 glContext->makeCurrent(); 887 glContext->makeCurrent();
888 } 888 }
889 } 889 }
890 sk_free(buffer); 890 sk_free(buffer);
891 } 891 }
892 } 892 }
893 } 893 }
894 #endif 894 #endif
OLDNEW
« no previous file with comments | « tests/GrPorterDuffTest.cpp ('k') | tests/SkpSkGrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698