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

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

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Fix build error related to isMultisamped renaming Created 5 years, 6 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/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/SkGpuDevice.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // we'd expect because we never change fDesc.fWidth/fHeight. 44 // we'd expect because we never change fDesc.fWidth/fHeight.
45 textureSize *= 2; 45 textureSize *= 2;
46 } 46 }
47 return textureSize; 47 return textureSize;
48 } 48 }
49 49
50 void GrTexture::validateDesc() const { 50 void GrTexture::validateDesc() const {
51 if (this->asRenderTarget()) { 51 if (this->asRenderTarget()) {
52 // This texture has a render target 52 // This texture has a render target
53 SkASSERT(0 != (fDesc.fFlags & kRenderTarget_GrSurfaceFlag)); 53 SkASSERT(0 != (fDesc.fFlags & kRenderTarget_GrSurfaceFlag));
54 SkASSERT(fDesc.fSampleCnt == this->asRenderTarget()->numSamples()); 54 SkASSERT(fDesc.fSampleCnt == this->asRenderTarget()->numColorSamples());
55 } else { 55 } else {
56 SkASSERT(0 == (fDesc.fFlags & kRenderTarget_GrSurfaceFlag)); 56 SkASSERT(0 == (fDesc.fFlags & kRenderTarget_GrSurfaceFlag));
57 SkASSERT(0 == fDesc.fSampleCnt); 57 SkASSERT(0 == fDesc.fSampleCnt);
58 } 58 }
59 } 59 }
60 60
61 ////////////////////////////////////////////////////////////////////////////// 61 //////////////////////////////////////////////////////////////////////////////
62 62
63 namespace { 63 namespace {
64 64
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 SkASSERT(desc.fWidth <= SK_MaxU16); 102 SkASSERT(desc.fWidth <= SK_MaxU16);
103 SkASSERT(desc.fHeight <= SK_MaxU16); 103 SkASSERT(desc.fHeight <= SK_MaxU16);
104 SkASSERT(static_cast<int>(desc.fConfig) < (1 << 6)); 104 SkASSERT(static_cast<int>(desc.fConfig) < (1 << 6));
105 SkASSERT(desc.fSampleCnt < (1 << 8)); 105 SkASSERT(desc.fSampleCnt < (1 << 8));
106 SkASSERT(flags < (1 << 10)); 106 SkASSERT(flags < (1 << 10));
107 SkASSERT(static_cast<int>(origin) < (1 << 8)); 107 SkASSERT(static_cast<int>(origin) < (1 << 8));
108 108
109 builder[0] = desc.fWidth | (desc.fHeight << 16); 109 builder[0] = desc.fWidth | (desc.fHeight << 16);
110 builder[1] = desc.fConfig | (desc.fSampleCnt << 6) | (flags << 14) | (origin << 24); 110 builder[1] = desc.fConfig | (desc.fSampleCnt << 6) | (flags << 14) | (origin << 24);
111 } 111 }
OLDNEW
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698