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

Side by Side Diff: tests/GpuLayerCacheTest.cpp

Issue 790643009: Revert of Fix layer hoisting image filter corner cases (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « src/gpu/GrRecordReplaceDraw.cpp ('k') | tests/RecordReplaceDrawTest.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 2014 Google Inc. 2 * Copyright 2014 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 #if SK_SUPPORT_GPU 8 #if SK_SUPPORT_GPU
9 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 25 matching lines...) Expand all
36 GrLayerCache* cache, 36 GrLayerCache* cache,
37 const SkPicture& picture, 37 const SkPicture& picture,
38 unsigned numToAdd, 38 unsigned numToAdd,
39 unsigned idOffset) { 39 unsigned idOffset) {
40 40
41 for (unsigned i = 0; i < numToAdd; ++i) { 41 for (unsigned i = 0; i < numToAdd; ++i) {
42 unsigned indices[1] = { idOffset+i+1 }; 42 unsigned indices[1] = { idOffset+i+1 };
43 GrCachedLayer* layer = cache->findLayerOrCreate(picture.uniqueID(), 43 GrCachedLayer* layer = cache->findLayerOrCreate(picture.uniqueID(),
44 idOffset+i+1, idOffset+i +2, 44 idOffset+i+1, idOffset+i +2,
45 SkIRect::MakeEmpty(), 45 SkIRect::MakeEmpty(),
46 SkIRect::MakeEmpty(),
47 SkMatrix::I(), 46 SkMatrix::I(),
48 indices, 1, 47 indices, 1,
49 NULL); 48 NULL);
50 REPORTER_ASSERT(reporter, layer); 49 REPORTER_ASSERT(reporter, layer);
51 GrCachedLayer* temp = TestingAccess::Find(cache, picture.uniqueID(), SkM atrix::I(), 50 GrCachedLayer* temp = TestingAccess::Find(cache, picture.uniqueID(), SkM atrix::I(),
52 indices, 1); 51 indices, 1);
53 REPORTER_ASSERT(reporter, temp == layer); 52 REPORTER_ASSERT(reporter, temp == layer);
54 53
55 REPORTER_ASSERT(reporter, TestingAccess::NumLayers(cache) == idOffset + i + 1); 54 REPORTER_ASSERT(reporter, TestingAccess::NumLayers(cache) == idOffset + i + 1);
56 55
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 240
242 picture.reset(NULL); 241 picture.reset(NULL);
243 cache.processDeletedPictures(); 242 cache.processDeletedPictures();
244 243
245 REPORTER_ASSERT(reporter, TestingAccess::NumLayers(&cache) == 0); 244 REPORTER_ASSERT(reporter, TestingAccess::NumLayers(&cache) == 0);
246 // TODO: add VRAM/resource cache check here 245 // TODO: add VRAM/resource cache check here
247 } 246 }
248 } 247 }
249 248
250 #endif 249 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrRecordReplaceDraw.cpp ('k') | tests/RecordReplaceDrawTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698