diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-14 18:50:07 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-14 18:50:07 +0000 |
commit | 5ed01d1f8fa3fa38105c252929f02dd7603271e3 (patch) | |
tree | 0bf0a87ec36544ba76ca5099f07f078085dab2f2 /src/core/SkPicture.cpp | |
parent | 1ab85c8719ef46a8f2de9912b3f84f387bddf0d1 (diff) |
Revert r13810 (Proposed SkCanvas API for preLoading textures to VRAM v2.0)
git-svn-id: http://skia.googlecode.com/svn/trunk@13811 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPicture.cpp')
-rw-r--r-- | src/core/SkPicture.cpp | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp index 92311f3a3a..9270236572 100644 --- a/src/core/SkPicture.cpp +++ b/src/core/SkPicture.cpp @@ -117,12 +117,9 @@ SkPicture::SkPicture() { fRecord = NULL; fPlayback = NULL; fWidth = fHeight = 0; - fAccelData = NULL; } -SkPicture::SkPicture(const SkPicture& src) - : INHERITED() - , fAccelData(NULL) { +SkPicture::SkPicture(const SkPicture& src) : INHERITED() { fWidth = src.fWidth; fHeight = src.fHeight; fRecord = NULL; @@ -144,7 +141,6 @@ SkPicture::SkPicture(const SkPicture& src) SkPicture::~SkPicture() { SkSafeUnref(fRecord); SkDELETE(fPlayback); - SkSafeUnref(fAccelData); } void SkPicture::internalOnly_EnableOpts(bool enableOpts) { @@ -156,7 +152,6 @@ void SkPicture::internalOnly_EnableOpts(bool enableOpts) { void SkPicture::swap(SkPicture& other) { SkTSwap(fRecord, other.fRecord); SkTSwap(fPlayback, other.fPlayback); - SkTSwap(fAccelData, other.fAccelData); SkTSwap(fWidth, other.fWidth); SkTSwap(fHeight, other.fHeight); } @@ -193,17 +188,6 @@ void SkPicture::clone(SkPicture* pictures, int count) const { } } -SkPicture::AccelData::Domain SkPicture::AccelData::GenerateDomain() { - static int32_t gNextID = 0; - - int32_t id = sk_atomic_inc(&gNextID); - if (id >= 1 << (8 * sizeof(Domain))) { - SK_CRASH(); - } - - return static_cast<Domain>(id); -} - /////////////////////////////////////////////////////////////////////////////// SkCanvas* SkPicture::beginRecording(int width, int height, @@ -212,7 +196,7 @@ SkCanvas* SkPicture::beginRecording(int width, int height, SkDELETE(fPlayback); fPlayback = NULL; } - SkSafeUnref(fAccelData); + SkSafeSetNull(fRecord); // Must be set before calling createBBoxHierarchy @@ -266,7 +250,7 @@ void SkPicture::endRecording() { void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { this->endRecording(); - if (NULL != fPlayback) { + if (fPlayback) { fPlayback->draw(*surface, callback); } } @@ -326,8 +310,7 @@ SkPicture::SkPicture(SkPicturePlayback* playback, int width, int height) : fPlayback(playback) , fRecord(NULL) , fWidth(width) - , fHeight(height) - , fAccelData(NULL) {} + , fHeight(height) {} SkPicture* SkPicture::CreateFromStream(SkStream* stream, InstallPixelRefProc proc) { SkPictInfo info; @@ -435,9 +418,7 @@ void SkPicture::flatten(SkWriteBuffer& buffer) const { } bool SkPicture::willPlayBackBitmaps() const { - if (!fPlayback) { - return false; - } + if (!fPlayback) return false; return fPlayback->containsBitmaps(); } |