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

Issue 798593003: Revert of Defer saves() until they're needed (Closed)

Created:
6 years ago by scroggo
Modified:
6 years ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Revert of Defer saves() until they're needed (patchset #7 id:120001 of https://codereview.chromium.org/767333002/) Reason for revert: Failing tests: http://chromegw.corp.google.com/i/client.skia/builders/Test-Win8-ShuttleA-GTX660-x86-Debug/builds/367/steps/dm/logs/stdio Original issue's description: > Defer saves() until they're needed > > patch from issue 759443006 at patchset 40001 (http://crrev.com/759443006#ps40001) > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/2ff1fcede1e9525285c5de1f35fb2dcb0fab32bd TBR=fmalita@google.com,mtklein@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia:

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -225 lines) Patch
M include/core/SkCanvas.h View 3 chunks +3 lines, -7 lines 0 comments Download
M src/core/SkCanvas.cpp View 18 chunks +34 lines, -75 lines 0 comments Download
M src/core/SkPictureRecord.cpp View 1 chunk +4 lines, -7 lines 0 comments Download
M tests/PictureBBHTest.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M tests/RecordDrawTest.cpp View 3 chunks +15 lines, -36 lines 0 comments Download
M tests/RecordOptsTest.cpp View 3 chunks +18 lines, -23 lines 0 comments Download
M tests/RecordPatternTest.cpp View 2 chunks +72 lines, -20 lines 0 comments Download
M tests/RecordReplaceDrawTest.cpp View 4 chunks +18 lines, -31 lines 0 comments Download
M tests/RecordTestUtils.h View 1 chunk +0 lines, -24 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
scroggo
Created Revert of Defer saves() until they're needed
6 years ago (2014-12-11 15:31:35 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/798593003/1
6 years ago (2014-12-11 15:31:54 UTC) #2
commit-bot: I haz the power
Failed to apply patch for tests/RecordReplaceDrawTest.cpp: While running git apply --index -3 -p1; error: patch ...
6 years ago (2014-12-11 15:32:02 UTC) #4
scroggo
6 years ago (2014-12-11 15:33:10 UTC) #5
On 2014/12/11 15:32:02, I haz the power (commit-bot) wrote:
> Failed to apply patch for tests/RecordReplaceDrawTest.cpp:
> While running git apply --index -3 -p1;
>   error: patch failed: tests/RecordReplaceDrawTest.cpp:85
>   Falling back to three-way merge...
>   Applied patch to 'tests/RecordReplaceDrawTest.cpp' with conflicts.
>   U tests/RecordReplaceDrawTest.cpp
> 
> Patch:       tests/RecordReplaceDrawTest.cpp
> Index: tests/RecordReplaceDrawTest.cpp
> diff --git a/tests/RecordReplaceDrawTest.cpp b/tests/RecordReplaceDrawTest.cpp
> index
>
e0e9466a2e674166908f9ec686c41e6404d57328..f1ebf82de0e72f0de2e75440ddba6a9fd34597c9
> 100644
> --- a/tests/RecordReplaceDrawTest.cpp
> +++ b/tests/RecordReplaceDrawTest.cpp
> @@ -52,18 +52,10 @@
>      JustOneDraw callback;
>      GrRecordReplaceDraw(pic, &canvas, NULL, SkMatrix::I(), &callback);
>  
> -    switch (rerecord.count()) {
> -        case 3:
> -            assert_type<SkRecords::Save>(r, rerecord, 0);
> -            assert_type<SkRecords::DrawRect>(r, rerecord, 1);
> -            assert_type<SkRecords::Restore>(r, rerecord, 2);
> -            break;
> -        case 1:
> -            assert_type<SkRecords::DrawRect>(r, rerecord, 0);
> -            break;
> -        default:
> -            REPORTER_ASSERT(r, false);
> -    }
> +    REPORTER_ASSERT(r, 3 == rerecord.count());
> +    assert_type<SkRecords::Save>(r, rerecord, 0);
> +    assert_type<SkRecords::DrawRect>(r, rerecord, 1);
> +    assert_type<SkRecords::Restore>(r, rerecord, 2);
>  }
>  
>  // Make sure GrRecordReplaceDraw balances unbalanced saves
> @@ -76,7 +68,7 @@
>  
>          // We won't balance this, but GrRecordReplaceDraw will for us.
>          canvas->save();
> -        canvas->scale(2, 2);
> +
>          pic.reset(recorder.endRecording());
>      }
>  
> @@ -85,8 +77,11 @@
>  
>      GrRecordReplaceDraw(pic, &canvas, NULL, SkMatrix::I(), NULL/*callback*/);
>  
> -    // ensure rerecord is balanced (in this case by checking that the count
is
> even)
> -    REPORTER_ASSERT(r, (rerecord.count() & 1) == 0);
> +    REPORTER_ASSERT(r, 4 == rerecord.count());
> +    assert_type<SkRecords::Save>(r, rerecord, 0);
> +    assert_type<SkRecords::Save>(r, rerecord, 1);
> +    assert_type<SkRecords::Restore>(r, rerecord, 2);
> +    assert_type<SkRecords::Restore>(r, rerecord, 3);
>  }
>  
>  // Test out the layer replacement functionality with and w/o a BBH
> @@ -132,22 +127,14 @@
>      SkRecorder canvas(&rerecord, kWidth, kHeight);
>      GrRecordReplaceDraw(pic, &canvas, layerCache, SkMatrix::I(),
> NULL/*callback*/);
>  
> -    int recount = rerecord.count();
> -    REPORTER_ASSERT(r, 5 == recount || 7 == recount);
> -
> -    int index = 0;
> -    if (7 == recount) {
> -        assert_type<SkRecords::Save>(r, rerecord, 0);
> -        index += 1;
> -    }
> -    assert_type<SkRecords::Save>(r, rerecord, index + 0);
> -    assert_type<SkRecords::SetMatrix>(r, rerecord, index + 1);
> -    assert_type<SkRecords::DrawBitmapRectToRect>(r, rerecord, index + 2);
> -    assert_type<SkRecords::Restore>(r, rerecord, index + 3);
> -    assert_type<SkRecords::DrawRect>(r, rerecord, index + 4);
> -    if (7 == recount) {
> -        assert_type<SkRecords::Restore>(r, rerecord, 6);
> -    }
> +    REPORTER_ASSERT(r, 7 == rerecord.count());
> +    assert_type<SkRecords::Save>(r, rerecord, 0);
> +    assert_type<SkRecords::Save>(r, rerecord, 1);
> +    assert_type<SkRecords::SetMatrix>(r, rerecord, 2);
> +    assert_type<SkRecords::DrawBitmapRectToRect>(r, rerecord, 3);
> +    assert_type<SkRecords::Restore>(r, rerecord, 4);
> +    assert_type<SkRecords::DrawRect>(r, rerecord, 5);
> +    assert_type<SkRecords::Restore>(r, rerecord, 6);
>  }
>  
>  DEF_GPUTEST(RecordReplaceDraw, r, factory) {

fix landed.

Powered by Google App Engine
This is Rietveld 408576698