| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 <initializer_list> | 8 #include <initializer_list> |
| 9 #include "Test.h" | 9 #include "Test.h" |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 for (auto srcRect : kSrcRects) { | 61 for (auto srcRect : kSrcRects) { |
| 62 for (auto dstPoint : kDstPoints) { | 62 for (auto dstPoint : kDstPoints) { |
| 63 GrSurfaceDesc srcDesc = baseDesc; | 63 GrSurfaceDesc srcDesc = baseDesc; |
| 64 srcDesc.fOrigin = sOrigin; | 64 srcDesc.fOrigin = sOrigin; |
| 65 srcDesc.fFlags = sFlags; | 65 srcDesc.fFlags = sFlags; |
| 66 GrSurfaceDesc dstDesc = baseDesc; | 66 GrSurfaceDesc dstDesc = baseDesc; |
| 67 dstDesc.fOrigin = dOrigin; | 67 dstDesc.fOrigin = dOrigin; |
| 68 dstDesc.fFlags = dFlags; | 68 dstDesc.fFlags = dFlags; |
| 69 | 69 |
| 70 SkAutoTUnref<GrTexture> src( | 70 SkAutoTUnref<GrTexture> src( |
| 71 context->textureProvider()->createTexture(srcDes
c, false, | 71 context->textureProvider()->createTexture(srcDes
c, SkBudgeted::kNo, |
| 72 srcPix
els.get(), | 72 srcPix
els.get(), |
| 73 kRowBy
tes)); | 73 kRowBy
tes)); |
| 74 SkAutoTUnref<GrTexture> dst( | 74 SkAutoTUnref<GrTexture> dst( |
| 75 context->textureProvider()->createTexture(dstDes
c, false, | 75 context->textureProvider()->createTexture(dstDes
c, SkBudgeted::kNo, |
| 76 dstPix
els.get(), | 76 dstPix
els.get(), |
| 77 kRowBy
tes)); | 77 kRowBy
tes)); |
| 78 if (!src || !dst) { | 78 if (!src || !dst) { |
| 79 ERRORF(reporter, | 79 ERRORF(reporter, |
| 80 "Could not create surfaces for copy surfa
ce test."); | 80 "Could not create surfaces for copy surfa
ce test."); |
| 81 continue; | 81 continue; |
| 82 } | 82 } |
| 83 | 83 |
| 84 bool result = context->copySurface(dst, src, srcRect
, dstPoint); | 84 bool result = context->copySurface(dst, src, srcRect
, dstPoint); |
| 85 | 85 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 } | 154 } |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 #endif | 163 #endif |
| OLD | NEW |