New issue
Advanced search Search tips
Starred by 2 users

Issue metadata

Status: Accepted
Owner:
Area: ----
Priority: Medium
Type: Defect



Sign in to add a comment

Surface/Canvas API changes

Project Member Reported by reed@google.com, Dec 9 2014 Back to list

Issue description

In an effort to make SkCanvas more "general", since it can front for raster/gpu/picture/pipe/pdf/etc., we want to deprecate APIs that look to raster-specific. These can more naturally live on SkSurface (which does not front for pictures or pdf).

e.g.

- Move readPixels() from canvas to surface
- remove NewRaster() from canvas (where are the pixels) and use surface instead.

 
Project Member

Comment 2 by hcm@google.com, Dec 7 2015

Labels: Hotlist-Fixit
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 21 2017

The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/353196f44f8c4f5fc3dc3783241faef264b80927

commit 353196f44f8c4f5fc3dc3783241faef264b80927
Author: Mike Reed <reed@google.com>
Date: Fri Jul 21 15:27:23 2017

clean read/write pixels signatures, augment SkSurface API

For now, not adding writePixels to surface, since it appears we may not
be able to remove writePixels from canvas :(

Bug: skia:3216
Change-Id: I64ccebb31effacffe615ae4537fb46a161a6768d
Reviewed-on: https://skia-review.googlesource.com/25562
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>

[modify] https://crrev.com/353196f44f8c4f5fc3dc3783241faef264b80927/src/core/SkDevice.cpp
[modify] https://crrev.com/353196f44f8c4f5fc3dc3783241faef264b80927/src/core/SkWritePixelsRec.h
[modify] https://crrev.com/353196f44f8c4f5fc3dc3783241faef264b80927/src/core/SkBitmapDevice.h
[modify] https://crrev.com/353196f44f8c4f5fc3dc3783241faef264b80927/src/gpu/SkGpuDevice.cpp
[modify] https://crrev.com/353196f44f8c4f5fc3dc3783241faef264b80927/include/core/SkSurface.h
[modify] https://crrev.com/353196f44f8c4f5fc3dc3783241faef264b80927/src/core/SkBitmapDevice.cpp
[modify] https://crrev.com/353196f44f8c4f5fc3dc3783241faef264b80927/src/core/SkCanvas.cpp
[modify] https://crrev.com/353196f44f8c4f5fc3dc3783241faef264b80927/src/gpu/SkGpuDevice.h
[modify] https://crrev.com/353196f44f8c4f5fc3dc3783241faef264b80927/src/image/SkSurface.cpp
[modify] https://crrev.com/353196f44f8c4f5fc3dc3783241faef264b80927/src/core/SkDevice.h
[modify] https://crrev.com/353196f44f8c4f5fc3dc3783241faef264b80927/src/image/SkReadPixelsRec.h

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 21 2017

The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/f19421961c59ceabfb88a5c5cdf7c7e31a95b015

commit f19421961c59ceabfb88a5c5cdf7c7e31a95b015
Author: Mike Reed <reed@google.com>
Date: Fri Jul 21 18:49:05 2017

don't rely on canvas->readPixels

Bug: skia:3216
Change-Id: I01a8d0083c79c0fe71fbc4d8cfdde4fa6e48b636
Reviewed-on: https://skia-review.googlesource.com/25741
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>

[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/SkImageTest.cpp
[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/ApplyGammaTest.cpp
[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/skbug6653.cpp
[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/ResourceCacheTest.cpp
[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/SurfaceSemaphoreTest.cpp
[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/BlurTest.cpp
[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/ImageNewShaderTest.cpp
[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/ReadPixelsTest.cpp
[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/ImageFilterTest.cpp
[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/DrawPathTest.cpp
[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/WritePixelsTest.cpp
[modify] https://crrev.com/f19421961c59ceabfb88a5c5cdf7c7e31a95b015/tests/PremulAlphaRoundTripTest.cpp

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 24 2017

The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/55963bcaab2bbbaf2b7574d906be82cf58fd0948

commit 55963bcaab2bbbaf2b7574d906be82cf58fd0948
Author: Ben Wagner <bungeman@google.com>
Date: Mon Jul 24 15:00:49 2017

Revert "pass surface to device-manager"

This reverts commit 7b215bcad3034aca262ca4eeebe31b5e8868638b.

Reason for revert: SampleApp on Linux doesn't ever draw anything.

Original change's description:
> pass surface to device-manager
> 
> Bug: skia:3216
> Change-Id: I8e00e9eca3763593a4071c16a3ab04c46bf83a3e
> Reviewed-on: https://skia-review.googlesource.com/26020
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=bsalomon@google.com,reed@google.com

Change-Id: I55f1292ab772bfe8fb1efb74f591b05bbe24d054
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:3216
Reviewed-on: https://skia-review.googlesource.com/26161
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

[modify] https://crrev.com/55963bcaab2bbbaf2b7574d906be82cf58fd0948/src/views/SkWindow.cpp
[modify] https://crrev.com/55963bcaab2bbbaf2b7574d906be82cf58fd0948/include/views/SkWindow.h
[modify] https://crrev.com/55963bcaab2bbbaf2b7574d906be82cf58fd0948/samplecode/SampleApp.h
[modify] https://crrev.com/55963bcaab2bbbaf2b7574d906be82cf58fd0948/samplecode/SampleApp.cpp
[modify] https://crrev.com/55963bcaab2bbbaf2b7574d906be82cf58fd0948/src/views/mac/SkNSView.mm

Sign in to add a comment