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

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

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 7 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/GrPipeline.cpp ('k') | src/gpu/GrRenderTarget.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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 const GrFragmentProcessor* addCoverageFragmentProcessor(const GrFragmentProc essor* processor) { 72 const GrFragmentProcessor* addCoverageFragmentProcessor(const GrFragmentProc essor* processor) {
73 SkASSERT(processor); 73 SkASSERT(processor);
74 fCoverageFragmentProcessors.push_back(SkRef(processor)); 74 fCoverageFragmentProcessors.push_back(SkRef(processor));
75 return processor; 75 return processor;
76 } 76 }
77 77
78 /** 78 /**
79 * Creates a GrSimpleTextureEffect that uses local coords as texture coordin ates. 79 * Creates a GrSimpleTextureEffect that uses local coords as texture coordin ates.
80 */ 80 */
81 void addColorTextureProcessor(GrTexture* texture, const SkMatrix& matrix) { 81 void addColorTextureProcessor(GrTexture* texture, const SkMatrix& matrix, Gr RenderTarget* dst) {
82 this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(texture, m atrix))->unref(); 82 this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(texture,
83 matrix, kL ocal_GrCoordSet, dst))->unref();
83 } 84 }
84 85
85 void addCoverageTextureProcessor(GrTexture* texture, const SkMatrix& matrix) { 86 void addCoverageTextureProcessor(GrTexture* texture, const SkMatrix& matrix, GrRenderTarget* dst) {
86 this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(texture , matrix))->unref(); 87 this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(texture ,
88 matrix, kLocal_GrCoordSet, dst))->unref();
87 } 89 }
88 90
89 void addColorTextureProcessor(GrTexture* texture, 91 void addColorTextureProcessor(GrTexture* texture,
90 const SkMatrix& matrix, 92 const SkMatrix& matrix,
91 const GrTextureParams& params) { 93 const GrTextureParams& params, GrRenderTarget* dst) {
92 this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(texture, m atrix, 94 this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(texture,
93 params))-> unref(); 95 matrix,
96 params, kL ocal_GrCoordSet, dst))->unref();
94 } 97 }
95 98
96 void addCoverageTextureProcessor(GrTexture* texture, 99 void addCoverageTextureProcessor(GrTexture* texture,
97 const SkMatrix& matrix, 100 const SkMatrix& matrix,
98 const GrTextureParams& params) { 101 const GrTextureParams& params, GrRenderTarg et* dst) {
99 this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(texture , matrix, 102 this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(texture ,
100 params) )->unref(); 103 matrix, params, kLocal_GrCoordSet, dst))->unref();
101 } 104 }
102 105
103 /** 106 /**
104 * When this object is destroyed it will remove any color/coverage FPs from the pipeline builder 107 * When this object is destroyed it will remove any color/coverage FPs from the pipeline builder
105 * that were added after its constructor. 108 * that were added after its constructor.
106 * This class can transiently modify its "const" GrPipelineBuilder object bu t will restore it 109 * This class can transiently modify its "const" GrPipelineBuilder object bu t will restore it
107 * when done - so it is notionally "const" correct. 110 * when done - so it is notionally "const" correct.
108 */ 111 */
109 class AutoRestoreFragmentProcessorState : public ::SkNoncopyable { 112 class AutoRestoreFragmentProcessorState : public ::SkNoncopyable {
110 public: 113 public:
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 FragmentProcessorArray fCoverageFragmentProcessors; 407 FragmentProcessorArray fCoverageFragmentProcessors;
405 GrClip fClip; 408 GrClip fClip;
406 409
407 mutable GrProcOptInfo fColorProcInfo; 410 mutable GrProcOptInfo fColorProcInfo;
408 mutable GrProcOptInfo fCoverageProcInfo; 411 mutable GrProcOptInfo fCoverageProcInfo;
409 412
410 friend class GrPipeline; 413 friend class GrPipeline;
411 }; 414 };
412 415
413 #endif 416 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPipeline.cpp ('k') | src/gpu/GrRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698