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

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

Issue 1471083002: Add debug option to clip each GrBatch to its device bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@clipbounds
Patch Set: update Created 5 years 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/GrDrawingManager.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 2015 Google Inc. 2 * Copyright 2015 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 GrDrawingManager_DEFINED 8 #ifndef GrDrawingManager_DEFINED
9 #define GrDrawingManager_DEFINED 9 #define GrDrawingManager_DEFINED
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 GrContext* getContext() { return fContext; } 46 GrContext* getContext() { return fContext; }
47 47
48 GrPathRenderer* getPathRenderer(const GrPathRenderer::CanDrawPathArgs& args, 48 GrPathRenderer* getPathRenderer(const GrPathRenderer::CanDrawPathArgs& args,
49 bool allowSW, 49 bool allowSW,
50 GrPathRendererChain::DrawType drawType, 50 GrPathRendererChain::DrawType drawType,
51 GrPathRenderer::StencilSupport* stencilSuppo rt = NULL); 51 GrPathRenderer::StencilSupport* stencilSuppo rt = NULL);
52 52
53 static bool ProgramUnitTest(GrContext* context, int maxStages); 53 static bool ProgramUnitTest(GrContext* context, int maxStages);
54 54
55 private: 55 private:
56 GrDrawingManager(GrContext* context) 56 GrDrawingManager(GrContext* context, const GrDrawTarget::Options& optionsFor DrawTargets)
57 : fContext(context) 57 : fContext(context)
58 , fOptionsForDrawTargets(optionsForDrawTargets)
58 , fAbandoned(false) 59 , fAbandoned(false)
59 , fNVPRTextContext(nullptr) 60 , fNVPRTextContext(nullptr)
60 , fPathRendererChain(nullptr) 61 , fPathRendererChain(nullptr)
61 , fSoftwarePathRenderer(nullptr) 62 , fSoftwarePathRenderer(nullptr)
62 , fFlushState(context->getGpu(), context->resourceProvider()) { 63 , fFlushState(context->getGpu(), context->resourceProvider()) {
63 sk_bzero(fTextContexts, sizeof(fTextContexts)); 64 sk_bzero(fTextContexts, sizeof(fTextContexts));
64 } 65 }
65 66
66 void abandon(); 67 void abandon();
67 void cleanup(); 68 void cleanup();
68 void reset(); 69 void reset();
69 void flush(); 70 void flush();
70 71
71 friend class GrContext; // for access to: ctor, abandon, reset & flush 72 friend class GrContext; // for access to: ctor, abandon, reset & flush
72 73
73 static const int kNumPixelGeometries = 5; // The different pixel geometries 74 static const int kNumPixelGeometries = 5; // The different pixel geometries
74 static const int kNumDFTOptions = 2; // DFT or no DFT 75 static const int kNumDFTOptions = 2; // DFT or no DFT
75 76
76 GrContext* fContext; 77 GrContext* fContext;
78 GrDrawTarget::Options fOptionsForDrawTargets;
77 79
78 bool fAbandoned; 80 bool fAbandoned;
79 SkTDArray<GrDrawTarget*> fDrawTargets; 81 SkTDArray<GrDrawTarget*> fDrawTargets;
80 82
81 GrTextContext* fNVPRTextContext; 83 GrTextContext* fNVPRTextContext;
82 GrTextContext* fTextContexts[kNumPixelGeometries][kNumDFTOption s]; 84 GrTextContext* fTextContexts[kNumPixelGeometries][kNumDFTOption s];
83 85
84 GrPathRendererChain* fPathRendererChain; 86 GrPathRendererChain* fPathRendererChain;
85 GrSoftwarePathRenderer* fSoftwarePathRenderer; 87 GrSoftwarePathRenderer* fSoftwarePathRenderer;
86 88
87 GrBatchFlushState fFlushState; 89 GrBatchFlushState fFlushState;
88 }; 90 };
89 91
90 #endif 92 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698