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

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

Issue 184443003: Add Gpu Tracing to Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Merge fixes 2 Created 6 years, 9 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 | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrInOrderDrawBuffer.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 2011 Google Inc. 2 * Copyright 2011 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 GrInOrderDrawBuffer_DEFINED 8 #ifndef GrInOrderDrawBuffer_DEFINED
9 #define GrInOrderDrawBuffer_DEFINED 9 #define GrInOrderDrawBuffer_DEFINED
10 10
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 GrSurface* src, 177 GrSurface* src,
178 const SkIRect& srcRect, 178 const SkIRect& srcRect,
179 const SkIPoint& dstPoint) SK_OVERRIDE; 179 const SkIPoint& dstPoint) SK_OVERRIDE;
180 virtual bool onCanCopySurface(GrSurface* dst, 180 virtual bool onCanCopySurface(GrSurface* dst,
181 GrSurface* src, 181 GrSurface* src,
182 const SkIRect& srcRect, 182 const SkIRect& srcRect,
183 const SkIPoint& dstPoint) SK_OVERRIDE; 183 const SkIPoint& dstPoint) SK_OVERRIDE;
184 184
185 bool quickInsideClip(const SkRect& devBounds); 185 bool quickInsideClip(const SkRect& devBounds);
186 186
187 virtual void onInstantGpuTraceEvent(const char* marker) SK_OVERRIDE; 187 virtual void didAddGpuTraceMarker() SK_OVERRIDE {}
188 virtual void onPushGpuTraceEvent(const char* marker) SK_OVERRIDE; 188 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE {}
189 virtual void onPopGpuTraceEvent() SK_OVERRIDE;
190
191 189
192 // Attempts to concat instances from info onto the previous draw. info must represent an 190 // Attempts to concat instances from info onto the previous draw. info must represent an
193 // instanced draw. The caller must have already recorded a new draw state an d clip if necessary. 191 // instanced draw. The caller must have already recorded a new draw state an d clip if necessary.
194 int concatInstancedDraw(const DrawInfo& info); 192 int concatInstancedDraw(const DrawInfo& info);
195 193
196 // we lazily record state and clip changes in order to skip clips and states that have no 194 // we lazily record state and clip changes in order to skip clips and states that have no
197 // effect. 195 // effect.
198 bool needsNewState() const; 196 bool needsNewState() const;
199 bool needsNewClip() const; 197 bool needsNewClip() const;
200 198
(...skipping 24 matching lines...) Expand all
225 SkSTArray<kCmdPreallocCnt, uint8_t, true> fCmds; 223 SkSTArray<kCmdPreallocCnt, uint8_t, true> fCmds;
226 GrSTAllocator<kDrawPreallocCnt, DrawRecord> fDraws; 224 GrSTAllocator<kDrawPreallocCnt, DrawRecord> fDraws;
227 GrSTAllocator<kStencilPathPreallocCnt, StencilPath> fStencilP aths; 225 GrSTAllocator<kStencilPathPreallocCnt, StencilPath> fStencilP aths;
228 GrSTAllocator<kDrawPathPreallocCnt, DrawPath> fDrawPath ; 226 GrSTAllocator<kDrawPathPreallocCnt, DrawPath> fDrawPath ;
229 GrSTAllocator<kDrawPathsPreallocCnt, DrawPaths> fDrawPath s; 227 GrSTAllocator<kDrawPathsPreallocCnt, DrawPaths> fDrawPath s;
230 GrSTAllocator<kStatePreallocCnt, GrDrawState::DeferredState> fStates; 228 GrSTAllocator<kStatePreallocCnt, GrDrawState::DeferredState> fStates;
231 GrSTAllocator<kClearPreallocCnt, Clear> fClears; 229 GrSTAllocator<kClearPreallocCnt, Clear> fClears;
232 GrSTAllocator<kCopySurfacePreallocCnt, CopySurface> fCopySurf aces; 230 GrSTAllocator<kCopySurfacePreallocCnt, CopySurface> fCopySurf aces;
233 GrSTAllocator<kClipPreallocCnt, SkClipStack> fClips; 231 GrSTAllocator<kClipPreallocCnt, SkClipStack> fClips;
234 GrSTAllocator<kClipPreallocCnt, SkIPoint> fClipOrig ins; 232 GrSTAllocator<kClipPreallocCnt, SkIPoint> fClipOrig ins;
233 SkTArray<GrTraceMarkerSet, false> fGpuCmdMa rkers;
235 234
236 GrDrawTarget* fDstGpu; 235 GrDrawTarget* fDstGpu;
237 236
238 bool fClipSet; 237 bool fClipSet;
239 238
240 enum ClipProxyState { 239 enum ClipProxyState {
241 kUnknown_ClipProxyState, 240 kUnknown_ClipProxyState,
242 kValid_ClipProxyState, 241 kValid_ClipProxyState,
243 kInvalid_ClipProxyState 242 kInvalid_ClipProxyState
244 }; 243 };
(...skipping 12 matching lines...) Expand all
257 // caller may conservatively over reserve vertices / indices. 256 // caller may conservatively over reserve vertices / indices.
258 // we release unused space back to allocator if possible 257 // we release unused space back to allocator if possible
259 // can only do this if there isn't an intervening pushGeometrySource() 258 // can only do this if there isn't an intervening pushGeometrySource()
260 size_t fUsedPoolVertexBytes; 259 size_t fUsedPoolVertexBytes;
261 size_t fUsedPoolIndexBytes; 260 size_t fUsedPoolIndexBytes;
262 }; 261 };
263 SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> fGeoPoolStateStack; 262 SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> fGeoPoolStateStack;
264 263
265 virtual bool isIssued(uint32_t drawID) { return drawID != fDrawID; } 264 virtual bool isIssued(uint32_t drawID) { return drawID != fDrawID; }
266 265
266 void addToCmdBuffer(uint8_t cmd);
267
267 bool fFlushing; 268 bool fFlushing;
268 uint32_t fDrawID; 269 uint32_t fDrawID;
269 270
270 typedef GrDrawTarget INHERITED; 271 typedef GrDrawTarget INHERITED;
271 }; 272 };
272 273
273 #endif 274 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698