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

Side by Side Diff: src/gpu/GrContext.cpp

Issue 379223004: Add macro so that gpu trace marker can add an arg to the TRACE_EVENT it makes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use internal_trace_event due to VS "unique" macro expansion 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/GrTracing.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 // Note that internalDrawPath may sw-rasterize the path into a scratch textu re. 1219 // Note that internalDrawPath may sw-rasterize the path into a scratch textu re.
1220 // Scratch textures can be recycled after they are returned to the texture 1220 // Scratch textures can be recycled after they are returned to the texture
1221 // cache. This presents a potential hazard for buffered drawing. However, 1221 // cache. This presents a potential hazard for buffered drawing. However,
1222 // the writePixels that uploads to the scratch will perform a flush so we're 1222 // the writePixels that uploads to the scratch will perform a flush so we're
1223 // OK. 1223 // OK.
1224 AutoRestoreEffects are; 1224 AutoRestoreEffects are;
1225 AutoCheckFlush acf(this); 1225 AutoCheckFlush acf(this);
1226 GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW, &are, &acf ); 1226 GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW, &are, &acf );
1227 GrDrawState* drawState = target->drawState(); 1227 GrDrawState* drawState = target->drawState();
1228 1228
1229 GR_CREATE_TRACE_MARKER("GrContext::drawPath", target); 1229 GR_CREATE_TRACE_MARKER1("GrContext::drawPath", target, "Is Convex", path.isC onvex());
1230 1230
1231 const SkStrokeRec& strokeRec = strokeInfo.getStrokeRec(); 1231 const SkStrokeRec& strokeRec = strokeInfo.getStrokeRec();
1232 1232
1233 bool useCoverageAA = paint.isAntiAlias() && !drawState->getRenderTarget()->i sMultisampled(); 1233 bool useCoverageAA = paint.isAntiAlias() && !drawState->getRenderTarget()->i sMultisampled();
1234 1234
1235 if (useCoverageAA && strokeRec.getWidth() < 0 && !path.isConvex()) { 1235 if (useCoverageAA && strokeRec.getWidth() < 0 && !path.isConvex()) {
1236 // Concave AA paths are expensive - try to avoid them for special cases 1236 // Concave AA paths are expensive - try to avoid them for special cases
1237 bool useVertexCoverage; 1237 bool useVertexCoverage;
1238 SkRect rects[2]; 1238 SkRect rects[2];
1239 1239
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1934 fDrawBuffer->removeGpuTraceMarker(marker); 1934 fDrawBuffer->removeGpuTraceMarker(marker);
1935 } 1935 }
1936 } 1936 }
1937 1937
1938 /////////////////////////////////////////////////////////////////////////////// 1938 ///////////////////////////////////////////////////////////////////////////////
1939 #if GR_CACHE_STATS 1939 #if GR_CACHE_STATS
1940 void GrContext::printCacheStats() const { 1940 void GrContext::printCacheStats() const {
1941 fResourceCache->printStats(); 1941 fResourceCache->printStats();
1942 } 1942 }
1943 #endif 1943 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrTracing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698