Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: src/core/SkCanvas.cpp

Issue 371023005: Add always-threaded SkRecord quilt tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bigger tile -> more GMs can quilt Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/verylargebitmap.cpp ('k') | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 90c8ec82670d0cc34342c5569cee3b97fe3efc95..4b1749a08b6876a30b4dc3db0e7129d9225828ce 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -54,47 +54,6 @@
#define dec_canvas()
#endif
-#ifdef SK_DEBUG
-#include "SkPixelRef.h"
-
-/*
- * Some pixelref subclasses can support being "locked" from another thread
- * during the lock-scope of skia calling them. In these instances, this balance
- * check will fail, but may not be indicative of a problem, so we allow a build
- * flag to disable this check.
- *
- * Potentially another fix would be to have a (debug-only) virtual or flag on
- * pixelref, which could tell us at runtime if this check is valid. That would
- * eliminate the need for this heavy-handed build check.
- */
-#ifdef SK_DISABLE_PIXELREF_LOCKCOUNT_BALANCE_CHECK
-class AutoCheckLockCountBalance {
-public:
- AutoCheckLockCountBalance(const SkBitmap&) { /* do nothing */ }
-};
-#else
-class AutoCheckLockCountBalance {
-public:
- AutoCheckLockCountBalance(const SkBitmap& bm) : fPixelRef(bm.pixelRef()) {
- fLockCount = fPixelRef ? fPixelRef->getLockCount() : 0;
- }
- ~AutoCheckLockCountBalance() {
- const int count = fPixelRef ? fPixelRef->getLockCount() : 0;
- SkASSERT(count == fLockCount);
- }
-
-private:
- const SkPixelRef* fPixelRef;
- int fLockCount;
-};
-#endif
-
-#define CHECK_LOCKCOUNT_BALANCE(bitmap) AutoCheckLockCountBalance clcb(bitmap)
-
-#else
- #define CHECK_LOCKCOUNT_BALANCE(bitmap)
-#endif
-
typedef SkTLazy<SkPaint> SkLazyPaint;
void SkCanvas::predrawNotify() {
@@ -1135,7 +1094,6 @@ void SkCanvas::internalDrawBitmap(const SkBitmap& bitmap,
}
SkDEBUGCODE(bitmap.validate();)
- CHECK_LOCKCOUNT_BALANCE(bitmap);
SkRect storage;
const SkRect* bounds = NULL;
@@ -1202,7 +1160,6 @@ void SkCanvas::drawSprite(const SkBitmap& bitmap, int x, int y,
return;
}
SkDEBUGCODE(bitmap.validate();)
- CHECK_LOCKCOUNT_BALANCE(bitmap);
SkPaint tmp;
if (NULL == paint) {
@@ -2011,8 +1968,6 @@ void SkCanvas::internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
return;
}
- CHECK_LOCKCOUNT_BALANCE(bitmap);
-
SkRect storage;
const SkRect* bounds = &dst;
if (NULL == paint || paint->canComputeFastBounds()) {
« no previous file with comments | « gm/verylargebitmap.cpp ('k') | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698