History

getting rid of QSHaredPointer in favor of std::shared_ptr

Sam Gateau committed 11 years ago

Commit ade404a1 parent fad623a11 files · +49 −30Browse files

Showing the changes to libraries/render-utils/src/TextureCache.cpp (1 of 11 files). Show all

Unified · Split

libraries/render-utils/src/TextureCache.cpp+3−3
@@ -90,7 +90,7 @@ const int permutation[256] = · 89 unmodified lines
9090 #define USE_CHRIS_NOISE 1
9191
9292 const gpu::TexturePointer& TextureCache::getPermutationNormalTexture() {
93− if (_permutationNormalTexture.isNull()) {
93+ if (_permutationNormalTexture) {
9494
9595 // the first line consists of random permutation offsets
9696 unsigned char data[256 * 2 * 3];
@@ -134,7 +134,7 @@ static void loadSingleColorTexture(const unsigned char* color) { · 37 unmodified lines
134134 */
135135
136136 const gpu::TexturePointer& TextureCache::getWhiteTexture() {
137− if (_whiteTexture.isNull()) {
137+ if (_whiteTexture) {
138138 _whiteTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1));
139139 _whiteTexture->assignStoredMip(0, _whiteTexture->getTexelFormat(), sizeof(OPAQUE_WHITE), OPAQUE_WHITE);
140140 }
@@ -142,7 +142,7 @@ const gpu::TexturePointer& TextureCache::getWhiteTexture() { · 1 unmodified line
142142 }
143143
144144 const gpu::TexturePointer& TextureCache::getBlueTexture() {
145− if (_blueTexture.isNull()) {
145+ if (_blueTexture) {
146146 _blueTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1));
147147 _blueTexture->assignStoredMip(0, _blueTexture->getTexelFormat(), sizeof(OPAQUE_BLUE), OPAQUE_BLUE);
148148 }