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

Side by Side Diff: src/gpu/GrDrawTarget.h

Issue 341583002: Modify gpu debug markers to store gpu device markers when a flush occurs. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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/GrDrawTarget.cpp » ('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 * Copyright 2010 Google Inc. 2 * Copyright 2010 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrDrawTarget_DEFINED 8 #ifndef GrDrawTarget_DEFINED
9 #define GrDrawTarget_DEFINED 9 #define GrDrawTarget_DEFINED
10 10
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 * Discards the contents render target. NULL indicates that the current rend er target should 441 * Discards the contents render target. NULL indicates that the current rend er target should
442 * be discarded. 442 * be discarded.
443 **/ 443 **/
444 virtual void discard(GrRenderTarget* = NULL) = 0; 444 virtual void discard(GrRenderTarget* = NULL) = 0;
445 445
446 /** 446 /**
447 * Called at start and end of gpu trace marking 447 * Called at start and end of gpu trace marking
448 * GR_CREATE_GPU_TRACE_MARKER(marker_str, target) will automatically call th ese at the start 448 * GR_CREATE_GPU_TRACE_MARKER(marker_str, target) will automatically call th ese at the start
449 * and end of a code block respectively 449 * and end of a code block respectively
450 */ 450 */
451 void addGpuTraceMarker(GrGpuTraceMarker* marker); 451 void addGpuTraceMarker(const GrGpuTraceMarker* marker);
452 void removeGpuTraceMarker(GrGpuTraceMarker* marker); 452 void removeGpuTraceMarker(const GrGpuTraceMarker* marker);
453
454 /**
455 * Takes the current active set of markers and stores them for later use. An y current marker
456 * in the active set is removed from the active set and the targets remove f unction is called.
457 * These functions do not work as a stack so you cannot call save a second t ime before calling
458 * restore. Also, it is assumed that when restore is called the current acti ve set of markers
459 * is empty. When the stored markers are added back into the active set, the targets add marker
460 * is called.
461 */
462 void saveActiveTraceMarkers();
463 void restoreActiveTraceMarkers();
453 464
454 /** 465 /**
455 * Copies a pixel rectangle from one surface to another. This call may final ize 466 * Copies a pixel rectangle from one surface to another. This call may final ize
456 * reserved vertex/index data (as though a draw call was made). The src pixe ls 467 * reserved vertex/index data (as though a draw call was made). The src pixe ls
457 * copied are specified by srcRect. They are copied to a rect of the same 468 * copied are specified by srcRect. They are copied to a rect of the same
458 * size in dst with top left at dstPoint. If the src rect is clipped by the 469 * size in dst with top left at dstPoint. If the src rect is clipped by the
459 * src bounds then pixel values in the dst rect corresponding to area clipp ed 470 * src bounds then pixel values in the dst rect corresponding to area clipp ed
460 * by the src rect are not overwritten. This method can fail and return fals e 471 * by the src rect are not overwritten. This method can fail and return fals e
461 * depending on the type of surface, configs, etc, and the backend-specific 472 * depending on the type of surface, configs, etc, and the backend-specific
462 * limitations. If rect is clipped out entirely by the src or dst bounds the n 473 * limitations. If rect is clipped out entirely by the src or dst bounds the n
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 }; 946 };
936 SkSTArray<kPreallocGeoSrcStateStackCnt, GeometrySrcState, true> fGeoSrcState Stack; 947 SkSTArray<kPreallocGeoSrcStateStackCnt, GeometrySrcState, true> fGeoSrcState Stack;
937 const GrClipData* fClip; 948 const GrClipData* fClip;
938 GrDrawState* fDrawState; 949 GrDrawState* fDrawState;
939 GrDrawState fDefaultDraw State; 950 GrDrawState fDefaultDraw State;
940 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar get. 951 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar get.
941 GrContext* fContext; 952 GrContext* fContext;
942 // To keep track that we always have at least as many debug marker adds as r emoves 953 // To keep track that we always have at least as many debug marker adds as r emoves
943 int fGpuTraceMar kerCount; 954 int fGpuTraceMar kerCount;
944 GrTraceMarkerSet fActiveTrace Markers; 955 GrTraceMarkerSet fActiveTrace Markers;
956 GrTraceMarkerSet fStoredTrace Markers;
945 957
946 typedef SkRefCnt INHERITED; 958 typedef SkRefCnt INHERITED;
947 }; 959 };
948 960
949 #endif 961 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698