diff options
author | robertphillips <robertphillips@google.com> | 2014-07-15 19:46:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-07-15 19:46:35 -0700 |
commit | 21048b588faa6a1c84949603ba82d9d4ba2f0cdd (patch) | |
tree | f8bcae49b43a710a5820016958c31635eea21540 /tests/GpuLayerCacheTest.cpp | |
parent | 32a311bfc056169c9f3b1c299c57ff5139a0d8bc (diff) |
Always have GrLayer's rect be valid
This CL just makes atlasing easier/clearer since there is a separate atlased query method. Not using the rect as a signal also simplifies the rendering of the layer in SkGpuDevice.cpp.
This is calved off from (Add atlased layer purging - https://codereview.chromium.org/367073002/)
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/384233002
Diffstat (limited to 'tests/GpuLayerCacheTest.cpp')
-rw-r--r-- | tests/GpuLayerCacheTest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/GpuLayerCacheTest.cpp b/tests/GpuLayerCacheTest.cpp index 02917e475f..d5c2dde4ad 100644 --- a/tests/GpuLayerCacheTest.cpp +++ b/tests/GpuLayerCacheTest.cpp @@ -39,7 +39,7 @@ static void create_layers(skiatest::Reporter* reporter, REPORTER_ASSERT(reporter, picture.uniqueID() == layers[i]->pictureID()); REPORTER_ASSERT(reporter, layers[i]->layerID() == i); REPORTER_ASSERT(reporter, NULL == layers[i]->texture()); - REPORTER_ASSERT(reporter, layers[i]->rect().isEmpty()); + REPORTER_ASSERT(reporter, !layers[i]->isAtlased()); } } @@ -83,10 +83,10 @@ DEF_GPUTEST(GpuLayerCache, reporter, factory) { // The first 4 layers should be in the atlas (and thus have non-empty // rects) if (i < 4) { - REPORTER_ASSERT(reporter, !layer->rect().isEmpty()); + REPORTER_ASSERT(reporter, layer->isAtlased()); } else { #endif - REPORTER_ASSERT(reporter, layer->rect().isEmpty()); + REPORTER_ASSERT(reporter, !layer->isAtlased()); #if USE_ATLAS } #endif @@ -109,11 +109,11 @@ DEF_GPUTEST(GpuLayerCache, reporter, factory) { // currently unlock). The final layer should be unlocked. if (i < 4) { REPORTER_ASSERT(reporter, NULL != layer->texture()); - REPORTER_ASSERT(reporter, !layer->rect().isEmpty()); + REPORTER_ASSERT(reporter, layer->isAtlased()); } else { #endif REPORTER_ASSERT(reporter, NULL == layer->texture()); - REPORTER_ASSERT(reporter, layer->rect().isEmpty()); + REPORTER_ASSERT(reporter, !layer->isAtlased()); #if USE_ATLAS } #endif |