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

Unified Diff: src/core/SkPixelRef.cpp

Issue 1090103002: Trace contention for lockPixels mutex (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Missing include Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPixelRef.cpp
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp
index dea8c8aed0ce9daa0f3977f779082b2a37d58a3e..20a8b34f067ff7eafc35759cb96b1b94de475a56 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -8,6 +8,7 @@
#include "SkBitmapCache.h"
#include "SkPixelRef.h"
#include "SkThread.h"
+#include "SkTraceEvent.h"
#ifdef SK_BUILD_FOR_WIN32
// We don't have SK_BASE_MUTEX_INIT on Windows.
@@ -155,7 +156,9 @@ bool SkPixelRef::lockPixels(LockRec* rec) {
SkASSERT(!fPreLocked || SKPIXELREF_PRELOCKED_LOCKCOUNT == fLockCount);
if (!fPreLocked) {
+ TRACE_EVENT_BEGIN0("skia", "SkPixelRef::lockPixelsMutex");
SkAutoMutexAcquire ac(*fMutex);
+ TRACE_EVENT_END0("skia", "SkPixelRef::lockPixelsMutex");
if (1 == ++fLockCount) {
SkASSERT(fRec.isZero());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698