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

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

Issue 1230813003: More threading of GrProcessorDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 5 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/GrPaint.cpp ('k') | src/gpu/GrSWMaskHelper.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 GrPipelineBuilder_DEFINED 8 #ifndef GrPipelineBuilder_DEFINED
9 #define GrPipelineBuilder_DEFINED 9 #define GrPipelineBuilder_DEFINED
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 SkASSERT(effect); 77 SkASSERT(effect);
78 SkNEW_APPEND_TO_TARRAY(&fCoverageStages, GrFragmentStage, (effect)); 78 SkNEW_APPEND_TO_TARRAY(&fCoverageStages, GrFragmentStage, (effect));
79 fCoverageProcInfoValid = false; 79 fCoverageProcInfoValid = false;
80 return effect; 80 return effect;
81 } 81 }
82 82
83 /** 83 /**
84 * Creates a GrSimpleTextureEffect that uses local coords as texture coordin ates. 84 * Creates a GrSimpleTextureEffect that uses local coords as texture coordin ates.
85 */ 85 */
86 void addColorTextureProcessor(GrTexture* texture, const SkMatrix& matrix) { 86 void addColorTextureProcessor(GrTexture* texture, const SkMatrix& matrix) {
87 this->addColorProcessor(GrSimpleTextureEffect::Create(texture, matrix))- >unref(); 87 this->addColorProcessor(GrSimpleTextureEffect::Create(&fProcDataManager, texture,
88 matrix))->unref();
88 } 89 }
89 90
90 void addCoverageTextureProcessor(GrTexture* texture, const SkMatrix& matrix) { 91 void addCoverageTextureProcessor(GrTexture* texture, const SkMatrix& matrix) {
91 this->addCoverageProcessor(GrSimpleTextureEffect::Create(texture, matrix ))->unref(); 92 this->addCoverageProcessor(GrSimpleTextureEffect::Create(&fProcDataManag er, texture,
93 matrix))->unref ();
92 } 94 }
93 95
94 void addColorTextureProcessor(GrTexture* texture, 96 void addColorTextureProcessor(GrTexture* texture,
95 const SkMatrix& matrix, 97 const SkMatrix& matrix,
96 const GrTextureParams& params) { 98 const GrTextureParams& params) {
97 this->addColorProcessor(GrSimpleTextureEffect::Create(texture, matrix, p arams))->unref(); 99 this->addColorProcessor(GrSimpleTextureEffect::Create(&fProcDataManager, texture, matrix,
100 params))->unref();
98 } 101 }
99 102
100 void addCoverageTextureProcessor(GrTexture* texture, 103 void addCoverageTextureProcessor(GrTexture* texture,
101 const SkMatrix& matrix, 104 const SkMatrix& matrix,
102 const GrTextureParams& params) { 105 const GrTextureParams& params) {
103 this->addCoverageProcessor(GrSimpleTextureEffect::Create(texture, matrix , params))->unref(); 106 this->addCoverageProcessor(GrSimpleTextureEffect::Create(&fProcDataManag er, texture, matrix,
107 params))->unref ();
104 } 108 }
105 109
106 /** 110 /**
107 * When this object is destroyed it will remove any color/coverage FPs from the pipeline builder 111 * When this object is destroyed it will remove any color/coverage FPs from the pipeline builder
108 * that were added after its constructor. 112 * that were added after its constructor.
109 */ 113 */
110 class AutoRestoreFragmentProcessors : public ::SkNoncopyable { 114 class AutoRestoreFragmentProcessors : public ::SkNoncopyable {
111 public: 115 public:
112 AutoRestoreFragmentProcessors() 116 AutoRestoreFragmentProcessors()
113 : fPipelineBuilder(NULL) 117 : fPipelineBuilder(NULL)
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 mutable GrProcOptInfo fCoverageProcInfo; 452 mutable GrProcOptInfo fCoverageProcInfo;
449 mutable bool fColorProcInfoValid; 453 mutable bool fColorProcInfoValid;
450 mutable bool fCoverageProcInfoValid; 454 mutable bool fCoverageProcInfoValid;
451 mutable GrColor fColorCache; 455 mutable GrColor fColorCache;
452 mutable GrColor fCoverageCache; 456 mutable GrColor fCoverageCache;
453 457
454 friend class GrPipeline; 458 friend class GrPipeline;
455 }; 459 };
456 460
457 #endif 461 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPaint.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698