diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-25 23:29:40 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-25 23:29:40 +0000 |
commit | 4d24b747e272355395f456e088a2d0177c00ddb5 (patch) | |
tree | 83a81375c0c293c08b51afc5d467a7f953c5eadf /include/core | |
parent | 1acab362fdde40948e47438edcc4326e04b9b52b (diff) |
Make SkImage_Gpu share it's pixelref with the surface to prevent premature return to scratch pool.
BUG=crbug.com/263329
TEST=Surface unit test, function Test_crbug263329
R=bsalomon@google.com, reed@google.com
Author: junov@chromium.org
Review URL: https://chromiumcodereview.appspot.com/20354003
git-svn-id: http://skia.googlecode.com/svn/trunk@10378 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkImage.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h index c85a2bfc6d..678133db33 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -65,7 +65,13 @@ public: static SkImage* NewRasterCopy(const Info&, const void* pixels, size_t rowBytes); static SkImage* NewRasterData(const Info&, SkData* pixels, size_t rowBytes); static SkImage* NewEncodedData(SkData*); - static SkImage* NewTexture(GrTexture*); + + /** + * GrTexture is a more logical parameter for this factory, but its + * interactions with scratch cache still has issues, so for now we take + * SkBitmap instead. This will be changed in the future. skbug.com/1449 + */ + static SkImage* NewTexture(const SkBitmap&); int width() const { return fWidth; } int height() const { return fHeight; } |