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

Side by Side Diff: src/gpu/gl/GrGLShaderBuilder.h

Issue 23483042: Replace uses of GrNoncopyable by SkNoncopyable. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rm GrNoncopyable.h Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLBufferImpl.h ('k') | src/gpu/gl/GrGpuGL.h » ('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 #ifndef GrGLShaderBuilder_DEFINED 8 #ifndef GrGLShaderBuilder_DEFINED
9 #define GrGLShaderBuilder_DEFINED 9 #define GrGLShaderBuilder_DEFINED
10 10
11 #include "GrAllocator.h" 11 #include "GrAllocator.h"
12 #include "GrBackendEffectFactory.h" 12 #include "GrBackendEffectFactory.h"
13 #include "GrColor.h" 13 #include "GrColor.h"
14 #include "GrEffect.h" 14 #include "GrEffect.h"
15 #include "SkTypes.h"
15 #include "gl/GrGLSL.h" 16 #include "gl/GrGLSL.h"
16 #include "gl/GrGLUniformManager.h" 17 #include "gl/GrGLUniformManager.h"
17 18
18 #include <stdarg.h> 19 #include <stdarg.h>
19 20
20 class GrGLContextInfo; 21 class GrGLContextInfo;
21 class GrEffectStage; 22 class GrEffectStage;
22 class GrGLProgramDesc; 23 class GrGLProgramDesc;
23 24
24 /** 25 /**
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 const GrGLContextInfo& ctxInfo() const { return fCtxInfo; } 380 const GrGLContextInfo& ctxInfo() const { return fCtxInfo; }
380 381
381 private: 382 private:
382 void appendDecls(const VarArray&, SkString*) const; 383 void appendDecls(const VarArray&, SkString*) const;
383 void appendUniformDecls(ShaderVisibility, SkString*) const; 384 void appendUniformDecls(ShaderVisibility, SkString*) const;
384 385
385 typedef GrGLUniformManager::BuilderUniform BuilderUniform; 386 typedef GrGLUniformManager::BuilderUniform BuilderUniform;
386 GrGLUniformManager::BuilderUniformArray fUniforms; 387 GrGLUniformManager::BuilderUniformArray fUniforms;
387 388
388 private: 389 private:
389 class CodeStage : GrNoncopyable { 390 class CodeStage : public SkNoncopyable {
390 public: 391 public:
391 CodeStage() : fNextIndex(0), fCurrentIndex(-1), fEffect(NULL) {} 392 CodeStage() : fNextIndex(0), fCurrentIndex(-1), fEffect(NULL) {}
392 393
393 bool inStageCode() const { 394 bool inStageCode() const {
394 this->validate(); 395 this->validate();
395 return NULL != fEffect; 396 return NULL != fEffect;
396 } 397 }
397 398
398 const GrEffectRef* effect() const { 399 const GrEffectRef* effect() const {
399 this->validate(); 400 this->validate();
400 return fEffect; 401 return fEffect;
401 } 402 }
402 403
403 int stageIndex() const { 404 int stageIndex() const {
404 this->validate(); 405 this->validate();
405 return fCurrentIndex; 406 return fCurrentIndex;
406 } 407 }
407 408
408 class AutoStageRestore : GrNoncopyable { 409 class AutoStageRestore : public SkNoncopyable {
409 public: 410 public:
410 AutoStageRestore(CodeStage* codeStage, const GrEffectRef* effect) { 411 AutoStageRestore(CodeStage* codeStage, const GrEffectRef* effect) {
411 SkASSERT(NULL != codeStage); 412 SkASSERT(NULL != codeStage);
412 fSavedIndex = codeStage->fCurrentIndex; 413 fSavedIndex = codeStage->fCurrentIndex;
413 fSavedEffect = codeStage->fEffect; 414 fSavedEffect = codeStage->fEffect;
414 415
415 if (NULL == effect) { 416 if (NULL == effect) {
416 codeStage->fCurrentIndex = -1; 417 codeStage->fCurrentIndex = -1;
417 } else { 418 } else {
418 codeStage->fCurrentIndex = codeStage->fNextIndex++; 419 codeStage->fCurrentIndex = codeStage->fNextIndex++;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 GrGLUniformManager::UniformHandle fRTHeightUniform; 487 GrGLUniformManager::UniformHandle fRTHeightUniform;
487 GrGLUniformManager::UniformHandle fDstCopyTopLeftUniform; 488 GrGLUniformManager::UniformHandle fDstCopyTopLeftUniform;
488 GrGLUniformManager::UniformHandle fDstCopyScaleUniform; 489 GrGLUniformManager::UniformHandle fDstCopyScaleUniform;
489 490
490 bool fTopLeftFragPosRead; 491 bool fTopLeftFragPosRead;
491 492
492 SkAutoTDelete<VertexBuilder> fVertexBuilder; 493 SkAutoTDelete<VertexBuilder> fVertexBuilder;
493 }; 494 };
494 495
495 #endif 496 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLBufferImpl.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698