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

Side by Side Diff: src/gpu/gl/GrGLRenderTarget.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/gl/GrGLRenderTarget.h ('k') | src/image/SkSurface_Gpu.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 2011 Google Inc. 2 * Copyright 2011 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 "GrGLRenderTarget.h" 8 #include "GrGLRenderTarget.h"
9 9
10 #include "GrGLGpu.h" 10 #include "GrGLGpu.h"
11 11
12 #define GPUGL static_cast<GrGLGpu*>(this->getGpu()) 12 #define GPUGL static_cast<GrGLGpu*>(this->getGpu())
13 #define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X) 13 #define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X)
14 14
15 // Because this class is virtually derived from GrSurface we must explicitly cal l its constructor. 15 // Because this class is virtually derived from GrSurface we must explicitly cal l its constructor.
16 GrGLRenderTarget::GrGLRenderTarget(GrGLGpu* gpu, const GrSurfaceDesc& desc, cons t IDDesc& idDesc) 16 GrGLRenderTarget::GrGLRenderTarget(GrGLGpu* gpu, const GrSurfaceDesc& desc, cons t IDDesc& idDesc)
17 : GrSurface(gpu, idDesc.fLifeCycle, desc) 17 : GrSurface(gpu, idDesc.fLifeCycle, desc)
18 , INHERITED(gpu, idDesc.fLifeCycle, desc) { 18 , INHERITED(gpu, idDesc.fLifeCycle, desc, idDesc.fSampleConfig) {
19 this->init(desc, idDesc); 19 this->init(desc, idDesc);
20 this->registerWithCache(); 20 this->registerWithCache();
21 } 21 }
22 22
23 GrGLRenderTarget::GrGLRenderTarget(GrGLGpu* gpu, const GrSurfaceDesc& desc, cons t IDDesc& idDesc, 23 GrGLRenderTarget::GrGLRenderTarget(GrGLGpu* gpu, const GrSurfaceDesc& desc, cons t IDDesc& idDesc,
24 Derived) 24 Derived)
25 : GrSurface(gpu, idDesc.fLifeCycle, desc) 25 : GrSurface(gpu, idDesc.fLifeCycle, desc)
26 , INHERITED(gpu, idDesc.fLifeCycle, desc) { 26 , INHERITED(gpu, idDesc.fLifeCycle, desc, idDesc.fSampleConfig) {
27 this->init(desc, idDesc); 27 this->init(desc, idDesc);
28 } 28 }
29 29
30 void GrGLRenderTarget::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) { 30 void GrGLRenderTarget::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
31 fRTFBOID = idDesc.fRTFBOID; 31 fRTFBOID = idDesc.fRTFBOID;
32 fTexFBOID = idDesc.fTexFBOID; 32 fTexFBOID = idDesc.fTexFBOID;
33 fMSColorRenderbufferID = idDesc.fMSColorRenderbufferID; 33 fMSColorRenderbufferID = idDesc.fMSColorRenderbufferID;
34 fIsWrapped = kWrapped_LifeCycle == idDesc.fLifeCycle; 34 fIsWrapped = kWrapped_LifeCycle == idDesc.fLifeCycle;
35 35
36 fViewport.fLeft = 0; 36 fViewport.fLeft = 0;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 INHERITED::onRelease(); 77 INHERITED::onRelease();
78 } 78 }
79 79
80 void GrGLRenderTarget::onAbandon() { 80 void GrGLRenderTarget::onAbandon() {
81 fRTFBOID = 0; 81 fRTFBOID = 0;
82 fTexFBOID = 0; 82 fTexFBOID = 0;
83 fMSColorRenderbufferID = 0; 83 fMSColorRenderbufferID = 0;
84 fIsWrapped = false; 84 fIsWrapped = false;
85 INHERITED::onAbandon(); 85 INHERITED::onAbandon();
86 } 86 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLRenderTarget.h ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698