Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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, "000" }, | 121 { SkBitmap::kNo_Config, "000" }, |
| 122 { SkBitmap::kARGB_4444_Config, "011" }, | 122 { SkBitmap::kRGB_565_Config, "011" }, |
|
bsalomon
2013/06/20 08:28:55
I'm not sure that this will work. 565 is not suppo
reed1
2013/06/21 17:44:07
Done.
| |
| 123 { SkBitmap::kARGB_8888_Config, "011" }, | 123 { SkBitmap::kARGB_8888_Config, "011" }, |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 const int W = 20; | 126 const int W = 20; |
| 127 const int H = 33; | 127 const int H = 33; |
| 128 | 128 |
| 129 for (size_t i = 0; i < SK_ARRAY_COUNT(gPairs); i++) { | 129 for (size_t i = 0; i < SK_ARRAY_COUNT(gPairs); i++) { |
| 130 SkBitmap src, dst; | 130 SkBitmap src, dst; |
| 131 | 131 |
| 132 SkGpuDevice* device = SkNEW_ARGS(SkGpuDevice, (grContext, gPairs[i]. fConfig, W, H)); | 132 SkGpuDevice* device = SkNEW_ARGS(SkGpuDevice, (grContext, gPairs[i]. fConfig, W, H)); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 189 } | 189 } |
| 190 } // for (size_t j = ... | 190 } // for (size_t j = ... |
| 191 } // for (size_t i = ... | 191 } // for (size_t i = ... |
| 192 } // GrContextFactory::GLContextType | 192 } // GrContextFactory::GLContextType |
| 193 } | 193 } |
| 194 | 194 |
| 195 #include "TestClassDef.h" | 195 #include "TestClassDef.h" |
| 196 DEFINE_GPUTESTCLASS("GpuBitmapCopy", TestGpuBitmapCopyClass, TestGpuBitmapCopy) | 196 DEFINE_GPUTESTCLASS("GpuBitmapCopy", TestGpuBitmapCopyClass, TestGpuBitmapCopy) |
| 197 | 197 |
| 198 #endif | 198 #endif |
| OLD | NEW |