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

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

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Multisampling and other fixes Created 5 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
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 8
9 #ifndef GrGLRenderTarget_DEFINED 9 #ifndef GrGLRenderTarget_DEFINED
10 #define GrGLRenderTarget_DEFINED 10 #define GrGLRenderTarget_DEFINED
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 ////////////////////////////////////////////////////////////////////////////// 63 //////////////////////////////////////////////////////////////////////////////
64 64
65 /** GL-specific subclass of GrRenderTarget. */ 65 /** GL-specific subclass of GrRenderTarget. */
66 class GrGLRenderTarget : public GrRenderTarget { 66 class GrGLRenderTarget : public GrRenderTarget {
67 public: 67 public:
68 struct IDDesc { 68 struct IDDesc {
69 SkAutoTUnref<GrGLFBO> fRenderFBO; 69 SkAutoTUnref<GrGLFBO> fRenderFBO;
70 SkAutoTUnref<GrGLFBO> fTextureFBO; 70 SkAutoTUnref<GrGLFBO> fTextureFBO;
71 GrGLuint fMSColorRenderbufferID; 71 GrGLuint fMSColorRenderbufferID;
72 GrGpuResource::LifeCycle fLifeCycle; 72 GrGpuResource::LifeCycle fLifeCycle;
73 GrSampleConfig fSampleConfig;
73 }; 74 };
74 75
75 GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&); 76 GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&);
76 77
77 void setViewport(const GrGLIRect& rect) { fViewport = rect; } 78 void setViewport(const GrGLIRect& rect) { fViewport = rect; }
78 const GrGLIRect& getViewport() const { return fViewport; } 79 const GrGLIRect& getViewport() const { return fViewport; }
79 80
80 // For multisampled renderbuffer render targets, these will return different GrGLFBO objects. If 81 // For multisampled renderbuffer render targets, these will return different GrGLFBO objects. If
81 // the render target is not texturable, textureFBO() returns NULL. If the re nder target auto 82 // the render target is not texturable, textureFBO() returns NULL. If the re nder target auto
82 // resolves to a texture, the same object is returned. 83 // resolves to a texture, the same object is returned.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 145
145 // onGpuMemorySize() needs to know what how many color values are owned per pixel. However, 146 // onGpuMemorySize() needs to know what how many color values are owned per pixel. However,
146 // abandon and release zero out the IDs and the cache needs to know the size even after those 147 // abandon and release zero out the IDs and the cache needs to know the size even after those
147 // actions. 148 // actions.
148 uint8_t fColorValuesPerPixel; 149 uint8_t fColorValuesPerPixel;
149 150
150 typedef GrRenderTarget INHERITED; 151 typedef GrRenderTarget INHERITED;
151 }; 152 };
152 153
153 #endif 154 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698