diff options
author | egdaniel <egdaniel@google.com> | 2014-06-19 10:19:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-06-19 10:19:29 -0700 |
commit | bbcb38df4f7477aa0a38da00a0757586a0125954 (patch) | |
tree | 6828c395bf84d45ee94922cfac22ffc1bb4eb089 /src/gpu/GrContext.cpp | |
parent | 3f73e8c8d589e0d5a1f75327b4aa22c1e745732d (diff) |
Allow gpu debug markers to be placed by using a GrContext
If a marker is placed using a GrContext, it will add a marker to both the
drawBuffer and gpu targets of that context.
BUG=skia:
R=bsalomon@google.com
Author: egdaniel@google.com
Review URL: https://codereview.chromium.org/340893002
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index e823a986cf..6c90c178d3 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -28,6 +28,7 @@ #include "GrStencilBuffer.h" #include "GrStrokeInfo.h" #include "GrTextStrike.h" +#include "GrTraceMarker.h" #include "GrTracing.h" #include "SkDashPathPriv.h" #include "SkGr.h" @@ -1904,6 +1905,20 @@ GrCacheable* GrContext::findAndRefCachedResource(const GrResourceKey& resourceKe return resource; } +void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { + fGpu->addGpuTraceMarker(marker); + if (NULL != fDrawBuffer) { + fDrawBuffer->addGpuTraceMarker(marker); + } +} + +void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { + fGpu->removeGpuTraceMarker(marker); + if (NULL != fDrawBuffer) { + fDrawBuffer->removeGpuTraceMarker(marker); + } +} + /////////////////////////////////////////////////////////////////////////////// #if GR_CACHE_STATS void GrContext::printCacheStats() const { |