Trace events in backend texture APIs and GrDataUtils

Bug: chromium:919885
Change-Id: I517afb5817d29ff8082cee63b8cce18f34a8ceac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223339
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Brian Salomon 2019-06-24 17:13:00 -04:00 committed by Skia Commit-Bot
parent cc84ea1d6c
commit c42eb66451
2 changed files with 7 additions and 0 deletions

View File

@ -322,6 +322,7 @@ GrBackendTexture GrContext::createBackendTexture(int width, int height,
GrMipMapped mipMapped,
GrRenderable renderable,
GrProtected isProtected) {
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
if (!this->asDirectContext()) {
return GrBackendTexture();
}
@ -365,6 +366,7 @@ GrBackendTexture GrContext::createBackendTexture(int width, int height,
const SkColor4f& color,
GrMipMapped mipMapped,
GrRenderable renderable) {
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
if (!this->asDirectContext()) {
return GrBackendTexture();
}
@ -404,6 +406,7 @@ GrBackendTexture GrContext::createBackendTexture(int width, int height,
}
void GrContext::deleteBackendTexture(GrBackendTexture backendTex) {
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
if (this->abandoned() || !backendTex.isValid()) {
return;
}

View File

@ -8,6 +8,7 @@
#include "src/gpu/GrDataUtils.h"
#include "src/core/SkColorSpaceXformSteps.h"
#include "src/core/SkTLazy.h"
#include "src/core/SkTraceEvent.h"
#include "src/core/SkUtils.h"
#include "src/gpu/GrColor.h"
@ -358,6 +359,7 @@ void GrFillInData(GrCompression compression, GrPixelConfig config,
int baseWidth, int baseHeight,
const SkTArray<size_t>& individualMipOffsets, char* dstPixels,
const SkColor4f& colorf) {
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
int mipLevels = individualMipOffsets.count();
@ -484,6 +486,8 @@ static inline void append_clamp_gamut(SkRasterPipeline* pipeline) {
bool GrConvertPixels(const GrPixelInfo& dstInfo, void* dst, const GrPixelInfo& srcInfo,
const void* src, GrSwizzle swizzle) {
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
if (dstInfo.fWidth != srcInfo.fWidth || srcInfo.fHeight != dstInfo.fHeight) {
return false;
}