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

Side by Side Diff: Source/platform/graphics/gpu/DrawingBuffer.h

Issue 1301923002: Add GL_CHROMIUM_screen_space_antialiasing to support alternative AA (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add empty implementation Created 5 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
« no previous file with comments | « no previous file | Source/platform/graphics/gpu/DrawingBuffer.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 (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // Destroys the TEXTURE_2D binding for the owned context 173 // Destroys the TEXTURE_2D binding for the owned context
174 bool copyToPlatformTexture(WebGraphicsContext3D*, Platform3DObject texture, GLenum internalFormat, 174 bool copyToPlatformTexture(WebGraphicsContext3D*, Platform3DObject texture, GLenum internalFormat,
175 GLenum destType, GLint level, bool premultiplyAlpha, bool flipY, SourceD rawingBuffer); 175 GLenum destType, GLint level, bool premultiplyAlpha, bool flipY, SourceD rawingBuffer);
176 176
177 void setPackAlignment(GLint param); 177 void setPackAlignment(GLint param);
178 178
179 void paintRenderingResultsToCanvas(ImageBuffer*); 179 void paintRenderingResultsToCanvas(ImageBuffer*);
180 bool paintRenderingResultsToImageData(int&, int&, SourceDrawingBuffer, WTF:: ArrayBufferContents&); 180 bool paintRenderingResultsToImageData(int&, int&, SourceDrawingBuffer, WTF:: ArrayBufferContents&);
181 181
182 int sampleCount() const { return m_sampleCount; } 182 int sampleCount() const { return m_sampleCount; }
183 bool explicitResolveOfMultisampleData() const { return m_multisampleMode == ExplicitResolve; } 183 bool explicitResolveOfMultisampleData() const { return m_antiAliasingMode == MSAAExplicitResolve; }
184 184
185 // Bind to m_drawFramebufferBinding or m_readFramebufferBinding if it's not 0. 185 // Bind to m_drawFramebufferBinding or m_readFramebufferBinding if it's not 0.
186 // Otherwise, bind to the default FBO. 186 // Otherwise, bind to the default FBO.
187 void restoreFramebufferBindings(); 187 void restoreFramebufferBindings();
188 188
189 protected: // For unittests 189 protected: // For unittests
190 DrawingBuffer( 190 DrawingBuffer(
191 PassOwnPtr<WebGraphicsContext3D>, 191 PassOwnPtr<WebGraphicsContext3D>,
192 PassOwnPtr<Extensions3DUtil>, 192 PassOwnPtr<Extensions3DUtil>,
193 bool multisampleExtensionSupported, 193 bool multisampleExtensionSupported,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 Platform3DObject m_multisampleFBO; 274 Platform3DObject m_multisampleFBO;
275 Platform3DObject m_multisampleColorBuffer; 275 Platform3DObject m_multisampleColorBuffer;
276 276
277 // True if our contents have been modified since the last presentation of th is buffer. 277 // True if our contents have been modified since the last presentation of th is buffer.
278 bool m_contentsChanged; 278 bool m_contentsChanged;
279 279
280 // True if commit() has been called since the last time markContentsChanged( ) had been called. 280 // True if commit() has been called since the last time markContentsChanged( ) had been called.
281 bool m_contentsChangeCommitted; 281 bool m_contentsChangeCommitted;
282 bool m_bufferClearNeeded; 282 bool m_bufferClearNeeded;
283 283
284 enum MultisampleMode { 284 enum AntialiasingMode {
285 None, 285 None,
286 ImplicitResolve, 286 MSAAImplicitResolve,
287 ExplicitResolve, 287 MSAAExplicitResolve,
288 ScreenSpaceAntialiasing,
288 }; 289 };
289 290
290 MultisampleMode m_multisampleMode; 291 AntialiasingMode m_antiAliasingMode;
291 292
292 WebGraphicsContext3D::Attributes m_actualAttributes; 293 WebGraphicsContext3D::Attributes m_actualAttributes;
293 unsigned m_internalColorFormat; 294 unsigned m_internalColorFormat;
294 unsigned m_colorFormat; 295 unsigned m_colorFormat;
295 unsigned m_internalRenderbufferFormat; 296 unsigned m_internalRenderbufferFormat;
296 int m_maxTextureSize; 297 int m_maxTextureSize;
297 int m_sampleCount; 298 int m_sampleCount;
298 int m_packAlignment; 299 int m_packAlignment;
299 bool m_destructionInProgress; 300 bool m_destructionInProgress;
300 bool m_isHidden; 301 bool m_isHidden;
(...skipping 13 matching lines...) Expand all
314 // used to resize the Canvas. 315 // used to resize the Canvas.
315 SkBitmap m_resizingBitmap; 316 SkBitmap m_resizingBitmap;
316 317
317 // Used to flip a bitmap vertically. 318 // Used to flip a bitmap vertically.
318 Vector<uint8_t> m_scanline; 319 Vector<uint8_t> m_scanline;
319 }; 320 };
320 321
321 } // namespace blink 322 } // namespace blink
322 323
323 #endif // DrawingBuffer_h 324 #endif // DrawingBuffer_h
OLDNEW
« no previous file with comments | « no previous file | Source/platform/graphics/gpu/DrawingBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698