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

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

Issue 749653002: WebGL: clarify which Front or Back buffer is used by each API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address nits Created 6 years 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 (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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 WebGraphicsContext3D* context(); 148 WebGraphicsContext3D* context();
149 149
150 // Returns the actual context attributes for this drawing buffer which may d iffer from the 150 // Returns the actual context attributes for this drawing buffer which may d iffer from the
151 // requested context attributes due to implementation limits. 151 // requested context attributes due to implementation limits.
152 WebGraphicsContext3D::Attributes getActualAttributes() const { return m_actu alAttributes; } 152 WebGraphicsContext3D::Attributes getActualAttributes() const { return m_actu alAttributes; }
153 153
154 // WebExternalTextureLayerClient implementation. 154 // WebExternalTextureLayerClient implementation.
155 virtual bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap*) override; 155 virtual bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap*) override;
156 virtual void mailboxReleased(const WebExternalTextureMailbox&, bool lostReso urce = false) override; 156 virtual void mailboxReleased(const WebExternalTextureMailbox&, bool lostReso urce = false) override;
157 157
158 enum SourceBuffer { Front, Back };
159 // Destroys the TEXTURE_2D binding for the owned context 158 // Destroys the TEXTURE_2D binding for the owned context
160 bool copyToPlatformTexture(WebGraphicsContext3D*, Platform3DObject texture, GLenum internalFormat, 159 bool copyToPlatformTexture(WebGraphicsContext3D*, Platform3DObject texture, GLenum internalFormat,
161 GLenum destType, GLint level, bool premultiplyAlpha, bool flipY, SourceB uffer); 160 GLenum destType, GLint level, bool premultiplyAlpha, bool flipY, SourceD rawingBuffer);
162 161
163 void setPackAlignment(GLint param); 162 void setPackAlignment(GLint param);
164 163
165 void paintRenderingResultsToCanvas(ImageBuffer*); 164 void paintRenderingResultsToCanvas(ImageBuffer*);
166 PassRefPtr<Uint8ClampedArray> paintRenderingResultsToImageData(int&, int&); 165 PassRefPtr<Uint8ClampedArray> paintRenderingResultsToImageData(int&, int&, S ourceDrawingBuffer);
167 166
168 protected: // For unittests 167 protected: // For unittests
169 DrawingBuffer( 168 DrawingBuffer(
170 PassOwnPtr<WebGraphicsContext3D>, 169 PassOwnPtr<WebGraphicsContext3D>,
171 PassOwnPtr<Extensions3DUtil>, 170 PassOwnPtr<Extensions3DUtil>,
172 bool multisampleExtensionSupported, 171 bool multisampleExtensionSupported,
173 bool packedDepthStencilExtensionSupported, 172 bool packedDepthStencilExtensionSupported,
174 bool discardFramebufferSupported, 173 bool discardFramebufferSupported,
175 PreserveDrawingBuffer, 174 PreserveDrawingBuffer,
176 WebGraphicsContext3D::Attributes requestedAttributes, 175 WebGraphicsContext3D::Attributes requestedAttributes,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // used to resize the Canvas. 303 // used to resize the Canvas.
305 SkBitmap m_resizingBitmap; 304 SkBitmap m_resizingBitmap;
306 305
307 // Used to flip a bitmap vertically. 306 // Used to flip a bitmap vertically.
308 Vector<uint8_t> m_scanline; 307 Vector<uint8_t> m_scanline;
309 }; 308 };
310 309
311 } // namespace blink 310 } // namespace blink
312 311
313 #endif // DrawingBuffer_h 312 #endif // DrawingBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698