diff options
| author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-13 15:29:03 +0000 |
|---|---|---|
| committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-13 15:29:03 +0000 |
| commit | bda591c739001b41d77048d680f81e05723cbc05 (patch) | |
| tree | 80f0326a191c966bc34057e4011bdb3233bc2a50 /samplecode/SampleApp.cpp | |
| parent | b2d93a91222dac2edb3c19128fd58fa2e74272aa (diff) | |
Revert of add peekPixels to SkCanvas and SkSurface (https://codereview.chromium.org/161733002/)
Reason for revert:
compile issues with gm/xfermodes3
Original issue's description:
> add peekPixels to SkCanvas and SkSurface
>
> clone of https://codereview.chromium.org/159723006/
>
> Committed: https://code.google.com/p/skia/source/detail?r=13427
R=jvanverth@google.com
NOTREECHECKS=true
NOTRY=true
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/163823002
git-svn-id: http://skia.googlecode.com/svn/trunk@13428 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleApp.cpp')
| -rw-r--r-- | samplecode/SampleApp.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index 15e56a3bb6..53e15a5fdf 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -1128,9 +1128,8 @@ void SampleWindow::listTitles() { static SkBitmap capture_bitmap(SkCanvas* canvas) { SkBitmap bm; - if (bm.allocPixels(canvas->imageInfo())) { - canvas->readPixels(&bm, 0, 0); - } + const SkBitmap& src = canvas->getDevice()->accessBitmap(false); + src.copyTo(&bm, src.config()); return bm; } |
