From 21048b588faa6a1c84949603ba82d9d4ba2f0cdd Mon Sep 17 00:00:00 2001 From: robertphillips Date: Tue, 15 Jul 2014 19:46:35 -0700 Subject: 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 --- tests/GpuLayerCacheTest.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/GpuLayerCacheTest.cpp') 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 -- cgit v1.2.3