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

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

Issue 1332923003: Remove batchtracker (Closed) Base URL: https://skia.googlesource.com/skia.git@latecreatepathprocessor
Patch Set: tweaks Created 5 years, 3 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/GrGeometryProcessor.h ('k') | src/gpu/GrOvalRenderer.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 GrGpu_DEFINED 8 #ifndef GrGpu_DEFINED
9 #define GrGpu_DEFINED 9 #define GrGpu_DEFINED
10 10
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 // This timestamp is always older than the current timestamp 280 // This timestamp is always older than the current timestamp
281 static const ResetTimestamp kExpiredTimestamp = 0; 281 static const ResetTimestamp kExpiredTimestamp = 0;
282 // Returns a timestamp based on the number of times the context was reset. 282 // Returns a timestamp based on the number of times the context was reset.
283 // This timestamp can be used to lazily detect when cached 3D context state 283 // This timestamp can be used to lazily detect when cached 3D context state
284 // is dirty. 284 // is dirty.
285 ResetTimestamp getResetTimestamp() const { return fResetTimestamp; } 285 ResetTimestamp getResetTimestamp() const { return fResetTimestamp; }
286 286
287 virtual void buildProgramDesc(GrProgramDesc*, 287 virtual void buildProgramDesc(GrProgramDesc*,
288 const GrPrimitiveProcessor&, 288 const GrPrimitiveProcessor&,
289 const GrPipeline&, 289 const GrPipeline&) const = 0;
290 const GrBatchTracker&) const = 0;
291 290
292 // Called to perform a surface to surface copy. Fallbacks to issuing a draw from the src to dst 291 // Called to perform a surface to surface copy. Fallbacks to issuing a draw from the src to dst
293 // take place at the GrDrawTarget level and this function implement faster c opy paths. The rect 292 // take place at the GrDrawTarget level and this function implement faster c opy paths. The rect
294 // and point are pre-clipped. The src rect and implied dst rect are guarante ed to be within the 293 // and point are pre-clipped. The src rect and implied dst rect are guarante ed to be within the
295 // src/dst bounds and non-empty. 294 // src/dst bounds and non-empty.
296 bool copySurface(GrSurface* dst, 295 bool copySurface(GrSurface* dst,
297 GrSurface* src, 296 GrSurface* src,
298 const SkIRect& srcRect, 297 const SkIRect& srcRect,
299 const SkIPoint& dstPoint); 298 const SkIPoint& dstPoint);
300 299
301 struct DrawArgs { 300 struct DrawArgs {
302 DrawArgs(const GrPrimitiveProcessor* primProc, 301 DrawArgs(const GrPrimitiveProcessor* primProc,
303 const GrPipeline* pipeline, 302 const GrPipeline* pipeline,
304 const GrProgramDesc* desc, 303 const GrProgramDesc* desc)
305 const GrBatchTracker* batchTracker)
306 : fPrimitiveProcessor(primProc) 304 : fPrimitiveProcessor(primProc)
307 , fPipeline(pipeline) 305 , fPipeline(pipeline)
308 , fDesc(desc) 306 , fDesc(desc) {
309 , fBatchTracker(batchTracker) { 307 SkASSERT(primProc && pipeline && desc);
310 SkASSERT(primProc && pipeline && desc && batchTracker);
311 } 308 }
312 const GrPrimitiveProcessor* fPrimitiveProcessor; 309 const GrPrimitiveProcessor* fPrimitiveProcessor;
313 const GrPipeline* fPipeline; 310 const GrPipeline* fPipeline;
314 const GrProgramDesc* fDesc; 311 const GrProgramDesc* fDesc;
315 const GrBatchTracker* fBatchTracker;
316 }; 312 };
317 313
318 void draw(const DrawArgs&, const GrVertices&); 314 void draw(const DrawArgs&, const GrVertices&);
319 315
320 /////////////////////////////////////////////////////////////////////////// 316 ///////////////////////////////////////////////////////////////////////////
321 // Debugging and Stats 317 // Debugging and Stats
322 318
323 class Stats { 319 class Stats {
324 public: 320 public:
325 #if GR_GPU_STATS 321 #if GR_GPU_STATS
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 ResetTimestamp fResetTi mestamp; 492 ResetTimestamp fResetTi mestamp;
497 uint32_t fResetBi ts; 493 uint32_t fResetBi ts;
498 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. 494 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
499 GrContext* fContext ; 495 GrContext* fContext ;
500 496
501 friend class GrPathRendering; 497 friend class GrPathRendering;
502 typedef SkRefCnt INHERITED; 498 typedef SkRefCnt INHERITED;
503 }; 499 };
504 500
505 #endif 501 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGeometryProcessor.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698