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

Side by Side Diff: src/gpu/GrEffect.cpp

Issue 542723004: Make GrDrawState and GrEffectStage use the pending io/exec ref mechanisms. (Closed) Base URL: https://skia.googlesource.com/skia.git@complete
Patch Set: rebase again Created 6 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/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.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 2012 Google Inc. 2 * Copyright 2012 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 #include "GrEffect.h" 8 #include "GrEffect.h"
9 #include "GrBackendEffectFactory.h" 9 #include "GrBackendEffectFactory.h"
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return this->getFactory().name(); 65 return this->getFactory().name();
66 } 66 }
67 67
68 void GrEffect::addCoordTransform(const GrCoordTransform* transform) { 68 void GrEffect::addCoordTransform(const GrCoordTransform* transform) {
69 fCoordTransforms.push_back(transform); 69 fCoordTransforms.push_back(transform);
70 SkDEBUGCODE(transform->setInEffect();) 70 SkDEBUGCODE(transform->setInEffect();)
71 } 71 }
72 72
73 void GrEffect::addTextureAccess(const GrTextureAccess* access) { 73 void GrEffect::addTextureAccess(const GrTextureAccess* access) {
74 fTextureAccesses.push_back(access); 74 fTextureAccesses.push_back(access);
75 this->addProgramResource(access->getTextureProgramResource());
75 } 76 }
76 77
77 void* GrEffect::operator new(size_t size) { 78 void* GrEffect::operator new(size_t size) {
78 return GrEffect_Globals::GetTLS()->allocate(size); 79 return GrEffect_Globals::GetTLS()->allocate(size);
79 } 80 }
80 81
81 void GrEffect::operator delete(void* target) { 82 void GrEffect::operator delete(void* target) {
82 GrEffect_Globals::GetTLS()->release(target); 83 GrEffect_Globals::GetTLS()->release(target);
83 } 84 }
84 85
85 #ifdef SK_DEBUG 86 #ifdef SK_DEBUG
86 void GrEffect::assertEquality(const GrEffect& other) const { 87 void GrEffect::assertEquality(const GrEffect& other) const {
87 SkASSERT(this->numTransforms() == other.numTransforms()); 88 SkASSERT(this->numTransforms() == other.numTransforms());
88 for (int i = 0; i < this->numTransforms(); ++i) { 89 for (int i = 0; i < this->numTransforms(); ++i) {
89 SkASSERT(this->coordTransform(i) == other.coordTransform(i)); 90 SkASSERT(this->coordTransform(i) == other.coordTransform(i));
90 } 91 }
91 SkASSERT(this->numTextures() == other.numTextures()); 92 SkASSERT(this->numTextures() == other.numTextures());
92 for (int i = 0; i < this->numTextures(); ++i) { 93 for (int i = 0; i < this->numTextures(); ++i) {
93 SkASSERT(this->textureAccess(i) == other.textureAccess(i)); 94 SkASSERT(this->textureAccess(i) == other.textureAccess(i));
94 } 95 }
95 } 96 }
96 #endif 97 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698