Adding optimization to avoid image copy in SkSurface copy on write when content is...
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 22 Apr 2013 14:28:01 +0000 (14:28 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 22 Apr 2013 14:28:01 +0000 (14:28 +0000)
commitc4c9870953037be94da00ac9db887d171f6e479c
tree3b23c2fd0a4de6ebb38d48b9371a76b9a50296d8
parent73c0abc2affdd5703f66c777e1cb3199179f3a09
Adding optimization to avoid image copy in SkSurface copy on write when content is discardable

This patch also adds code to SkDeferredCanvas to trigger the optimization.

TEST=DeferredSurfaceCopy bench, Surface unit test
R=reed@google.com

Author: junov@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14063015

git-svn-id: http://skia.googlecode.com/svn/trunk@8797 2bbb7eff-a529-9590-31e7-b0007b416f81
include/core/SkSurface.h
src/core/SkCanvas.cpp
src/image/SkSurface.cpp
src/image/SkSurface_Base.h
src/image/SkSurface_Gpu.cpp
src/image/SkSurface_Picture.cpp
src/image/SkSurface_Raster.cpp
src/utils/SkDeferredCanvas.cpp
tests/SurfaceTest.cpp