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

Side by Side Diff: tests/GpuBitmapCopyTest.cpp

Issue 68973005: Expand pixelref to return SkImageInfo and rowbytes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #if SK_SUPPORT_GPU 9 #if SK_SUPPORT_GPU
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 GrContext* grContext = factory->get(glType); 111 GrContext* grContext = factory->get(glType);
112 if (NULL == grContext) { 112 if (NULL == grContext) {
113 continue; 113 continue;
114 } 114 }
115 115
116 116
117 if (NULL == grContext) { 117 if (NULL == grContext) {
118 return; 118 return;
119 } 119 }
120 static const Pair gPairs[] = { 120 static const Pair gPairs[] = {
121 { SkBitmap::kNo_Config, "00" }, 121 /*
122 { SkBitmap::kARGB_8888_Config, "01" }, 122 * Testing with no-config is odd, as the gpudevice should (and now does)
123 * logically fail to construct, so I've disabled those tests <reed>
124 */
125 // { SkBitmap::kNo_Config, "00" },
126 // { SkBitmap::kARGB_8888_Config, "01" },
127 { SkBitmap::kARGB_8888_Config, "1" },
123 }; 128 };
124 129
125 const int W = 20; 130 const int W = 20;
126 const int H = 33; 131 const int H = 33;
127 132
128 for (size_t i = 0; i < SK_ARRAY_COUNT(gPairs); i++) { 133 for (size_t i = 0; i < SK_ARRAY_COUNT(gPairs); i++) {
129 SkBitmap src, dst; 134 SkBitmap src, dst;
130 135
131 SkGpuDevice* device = SkNEW_ARGS(SkGpuDevice, (grContext, gPairs[i]. fConfig, W, H)); 136 SkGpuDevice* device = SkNEW_ARGS(SkGpuDevice, (grContext, gPairs[i]. fConfig, W, H));
132 SkAutoUnref aur(device); 137 SkAutoUnref aur(device);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 193 }
189 } // for (size_t j = ... 194 } // for (size_t j = ...
190 } // for (size_t i = ... 195 } // for (size_t i = ...
191 } // GrContextFactory::GLContextType 196 } // GrContextFactory::GLContextType
192 } 197 }
193 198
194 #include "TestClassDef.h" 199 #include "TestClassDef.h"
195 DEFINE_GPUTESTCLASS("GpuBitmapCopy", TestGpuBitmapCopyClass, TestGpuBitmapCopy) 200 DEFINE_GPUTESTCLASS("GpuBitmapCopy", TestGpuBitmapCopyClass, TestGpuBitmapCopy)
196 201
197 #endif 202 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698