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

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

Issue 12965018: Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
11 #include "GrDrawTarget.h" 11 #include "GrDrawTarget.h"
12 #include "GrDrawTargetCaps.h"
12 #include "GrRenderTarget.h" 13 #include "GrRenderTarget.h"
13 #include "GrTexture.h" 14 #include "GrTexture.h"
14 #include "GrVertexBuffer.h" 15 #include "GrVertexBuffer.h"
15 16
16 #include "SkStrokeRec.h" 17 #include "SkStrokeRec.h"
17 18
18 SK_DEFINE_INST_COUNT(GrDrawTarget) 19 SK_DEFINE_INST_COUNT(GrDrawTarget)
19 20
20 //////////////////////////////////////////////////////////////////////////////// 21 ////////////////////////////////////////////////////////////////////////////////
21 22
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 fTarget = target; 673 fTarget = target;
673 fClip = fTarget->getClip(); 674 fClip = fTarget->getClip();
674 fStack.init(); 675 fStack.init();
675 fStack.get()->clipDevRect(newClip, SkRegion::kReplace_Op); 676 fStack.get()->clipDevRect(newClip, SkRegion::kReplace_Op);
676 fReplacementClip.fClipStack = fStack.get(); 677 fReplacementClip.fClipStack = fStack.get();
677 target->setClip(&fReplacementClip); 678 target->setClip(&fReplacementClip);
678 } 679 }
679 680
680 /////////////////////////////////////////////////////////////////////////////// 681 ///////////////////////////////////////////////////////////////////////////////
681 682
682 SK_DEFINE_INST_COUNT(GrDrawTarget::Caps) 683 SK_DEFINE_INST_COUNT(GrDrawTargetCaps)
683 684
684 void GrDrawTarget::Caps::reset() { 685 void GrDrawTargetCaps::reset() {
685 f8BitPaletteSupport = false; 686 f8BitPaletteSupport = false;
686 fNPOTTextureTileSupport = false; 687 fNPOTTextureTileSupport = false;
687 fTwoSidedStencilSupport = false; 688 fTwoSidedStencilSupport = false;
688 fStencilWrapOpsSupport = false; 689 fStencilWrapOpsSupport = false;
689 fHWAALineSupport = false; 690 fHWAALineSupport = false;
690 fShaderDerivativeSupport = false; 691 fShaderDerivativeSupport = false;
691 fGeometryShaderSupport = false; 692 fGeometryShaderSupport = false;
692 fDualSourceBlendingSupport = false; 693 fDualSourceBlendingSupport = false;
693 fBufferLockSupport = false; 694 fBufferLockSupport = false;
694 fPathStencilingSupport = false; 695 fPathStencilingSupport = false;
695 696
696 fMaxRenderTargetSize = 0; 697 fMaxRenderTargetSize = 0;
697 fMaxTextureSize = 0; 698 fMaxTextureSize = 0;
698 fMaxSampleCount = 0; 699 fMaxSampleCount = 0;
699 } 700 }
700 701
701 GrDrawTarget::Caps& GrDrawTarget::Caps::operator=(const GrDrawTarget::Caps& othe r) { 702 GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) {
702 f8BitPaletteSupport = other.f8BitPaletteSupport; 703 f8BitPaletteSupport = other.f8BitPaletteSupport;
703 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport; 704 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport;
704 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport; 705 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport;
705 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport; 706 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport;
706 fHWAALineSupport = other.fHWAALineSupport; 707 fHWAALineSupport = other.fHWAALineSupport;
707 fShaderDerivativeSupport = other.fShaderDerivativeSupport; 708 fShaderDerivativeSupport = other.fShaderDerivativeSupport;
708 fGeometryShaderSupport = other.fGeometryShaderSupport; 709 fGeometryShaderSupport = other.fGeometryShaderSupport;
709 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport; 710 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport;
710 fBufferLockSupport = other.fBufferLockSupport; 711 fBufferLockSupport = other.fBufferLockSupport;
711 fPathStencilingSupport = other.fPathStencilingSupport; 712 fPathStencilingSupport = other.fPathStencilingSupport;
712 713
713 fMaxRenderTargetSize = other.fMaxRenderTargetSize; 714 fMaxRenderTargetSize = other.fMaxRenderTargetSize;
714 fMaxTextureSize = other.fMaxTextureSize; 715 fMaxTextureSize = other.fMaxTextureSize;
715 fMaxSampleCount = other.fMaxSampleCount; 716 fMaxSampleCount = other.fMaxSampleCount;
716 717
717 return *this; 718 return *this;
718 } 719 }
719 720
720 void GrDrawTarget::Caps::print() const { 721 void GrDrawTargetCaps::print() const {
721 static const char* gNY[] = {"NO", "YES"}; 722 static const char* gNY[] = {"NO", "YES"};
722 GrPrintf("8 Bit Palette Support : %s\n", gNY[f8BitPaletteSupport]); 723 GrPrintf("8 Bit Palette Support : %s\n", gNY[f8BitPaletteSupport]);
723 GrPrintf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileSupport]) ; 724 GrPrintf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileSupport]) ;
724 GrPrintf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilSupport]) ; 725 GrPrintf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilSupport]) ;
725 GrPrintf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSupport]); 726 GrPrintf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSupport]);
726 GrPrintf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]); 727 GrPrintf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]);
727 GrPrintf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport] ); 728 GrPrintf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport] );
728 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]); 729 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]);
729 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor t]); 730 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor t]);
730 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); 731 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]);
731 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]); 732 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]);
732 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize); 733 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize);
733 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize); 734 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize);
734 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount); 735 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount);
735 } 736 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698