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

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

Issue 975303005: Creation of GrBatchAtlas and Distancefieldpathrenderer batch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more tidying Created 5 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
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 13 matching lines...) Expand all
24 #include "SkPath.h" 24 #include "SkPath.h"
25 #include "SkStrokeRec.h" 25 #include "SkStrokeRec.h"
26 #include "SkTArray.h" 26 #include "SkTArray.h"
27 #include "SkTLazy.h" 27 #include "SkTLazy.h"
28 #include "SkTypes.h" 28 #include "SkTypes.h"
29 #include "SkXfermode.h" 29 #include "SkXfermode.h"
30 30
31 class GrBatch; 31 class GrBatch;
32 class GrClip; 32 class GrClip;
33 class GrDrawTargetCaps; 33 class GrDrawTargetCaps;
34 class GrGeometryProcessor;
34 class GrPath; 35 class GrPath;
35 class GrPathRange; 36 class GrPathRange;
36 class GrPipeline; 37 class GrPipeline;
37 38
38 class GrDrawTarget : public SkRefCnt { 39 class GrDrawTarget : public SkRefCnt {
39 public: 40 public:
40 SK_DECLARE_INST_COUNT(GrDrawTarget) 41 SK_DECLARE_INST_COUNT(GrDrawTarget)
41 42
42 typedef GrPathRange::PathIndexType PathIndexType; 43 typedef GrPathRange::PathIndexType PathIndexType;
43 typedef GrPathRendering::PathTransformType PathTransformType; 44 typedef GrPathRendering::PathTransformType PathTransformType;
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 fDrawTarget(drawTarget), fDrawID(drawID) {} 482 fDrawTarget(drawTarget), fDrawID(drawID) {}
482 483
483 bool isIssued() { return fDrawTarget && fDrawTarget->isIssued(fDrawID); } 484 bool isIssued() { return fDrawTarget && fDrawTarget->isIssued(fDrawID); }
484 485
485 private: 486 private:
486 GrDrawTarget* fDrawTarget; 487 GrDrawTarget* fDrawTarget;
487 uint32_t fDrawID; // this may wrap, but we're doing direct compa rison 488 uint32_t fDrawID; // this may wrap, but we're doing direct compa rison
488 // so that should be okay 489 // so that should be okay
489 }; 490 };
490 491
492 typedef uint64_t BatchToken;
493
491 virtual DrawToken getCurrentDrawToken() { return DrawToken(this, 0); } 494 virtual DrawToken getCurrentDrawToken() { return DrawToken(this, 0); }
492 495
493 /** 496 /**
494 * Used to communicate draws to GPUs / subclasses 497 * Used to communicate draws to GPUs / subclasses
495 */ 498 */
496 class DrawInfo { 499 class DrawInfo {
497 public: 500 public:
498 DrawInfo() { fDevBounds = NULL; } 501 DrawInfo() { fDevBounds = NULL; }
499 DrawInfo(const DrawInfo& di) { (*this) = di; } 502 DrawInfo(const DrawInfo& di) { (*this) = di; }
500 DrawInfo& operator =(const DrawInfo& di); 503 DrawInfo& operator =(const DrawInfo& di);
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 virtual bool setupClip(GrPipelineBuilder*, 855 virtual bool setupClip(GrPipelineBuilder*,
853 GrPipelineBuilder::AutoRestoreFragmentProcessors*, 856 GrPipelineBuilder::AutoRestoreFragmentProcessors*,
854 GrPipelineBuilder::AutoRestoreStencil*, 857 GrPipelineBuilder::AutoRestoreStencil*,
855 GrScissorState* scissorState, 858 GrScissorState* scissorState,
856 const SkRect* devBounds) SK_OVERRIDE; 859 const SkRect* devBounds) SK_OVERRIDE;
857 860
858 typedef GrDrawTarget INHERITED; 861 typedef GrDrawTarget INHERITED;
859 }; 862 };
860 863
861 #endif 864 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698