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

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

Issue 2053983002: WebGL: Three small fixes to Image CHROMIUM logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 bool bufferClearNeeded() const; 181 bool bufferClearNeeded() const;
182 void setIsHidden(bool); 182 void setIsHidden(bool);
183 void setFilterQuality(SkFilterQuality); 183 void setFilterQuality(SkFilterQuality);
184 184
185 // Whether the target for draw operations has format GL_RGBA, but is 185 // Whether the target for draw operations has format GL_RGBA, but is
186 // emulating format GL_RGB. When the target's storage is first 186 // emulating format GL_RGB. When the target's storage is first
187 // allocated, its alpha channel must be cleared to 1. All future drawing 187 // allocated, its alpha channel must be cleared to 1. All future drawing
188 // operations must use a color mask with alpha=GL_FALSE. 188 // operations must use a color mask with alpha=GL_FALSE.
189 bool requiresAlphaChannelToBePreserved(); 189 bool requiresAlphaChannelToBePreserved();
190 190
191 // Similar to requiresAlphaChannelToBePreserved(), but always targets the
192 // default framebuffer.
193 bool defaultBufferRequiresAlphaChannelToBePreserved();
194
191 WebLayer* platformLayer(); 195 WebLayer* platformLayer();
192 196
193 gpu::gles2::GLES2Interface* contextGL(); 197 gpu::gles2::GLES2Interface* contextGL();
194 WebGraphicsContext3DProvider* contextProvider(); 198 WebGraphicsContext3DProvider* contextProvider();
195 199
196 // WebExternalTextureLayerClient implementation. 200 // WebExternalTextureLayerClient implementation.
197 bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap*) override ; 201 bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap*) override ;
198 void mailboxReleased(const WebExternalTextureMailbox&, bool lostResource = f alse) override; 202 void mailboxReleased(const WebExternalTextureMailbox&, bool lostResource = f alse) override;
199 203
200 // Destroys the TEXTURE_2D binding for the owned context 204 // Destroys the TEXTURE_2D binding for the owned context
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // implemented by forwarding all draw operations to a multisample 351 // implemented by forwarding all draw operations to a multisample
348 // renderbuffer, which is resolved before any read operations or swaps. 352 // renderbuffer, which is resolved before any read operations or swaps.
349 bool wantExplicitResolve(); 353 bool wantExplicitResolve();
350 354
351 // Whether the WebGL client wants a depth or stencil buffer. 355 // Whether the WebGL client wants a depth or stencil buffer.
352 bool wantDepthOrStencil(); 356 bool wantDepthOrStencil();
353 357
354 // The format to use when creating a multisampled renderbuffer. 358 // The format to use when creating a multisampled renderbuffer.
355 GLenum getMultisampledRenderbufferFormat(); 359 GLenum getMultisampledRenderbufferFormat();
356 360
357 // Similar to requiresAlphaChannelToBePreserved(), but always targets the
358 // default framebuffer.
359 bool defaultBufferRequiresAlphaChannelToBePreserved();
360
361 const PreserveDrawingBuffer m_preserveDrawingBuffer; 361 const PreserveDrawingBuffer m_preserveDrawingBuffer;
362 bool m_scissorEnabled = false; 362 bool m_scissorEnabled = false;
363 GLuint m_texture2DBinding = 0; 363 GLuint m_texture2DBinding = 0;
364 GLuint m_drawFramebufferBinding = 0; 364 GLuint m_drawFramebufferBinding = 0;
365 GLuint m_readFramebufferBinding = 0; 365 GLuint m_readFramebufferBinding = 0;
366 GLuint m_renderbufferBinding = 0; 366 GLuint m_renderbufferBinding = 0;
367 GLenum m_activeTextureUnit = GL_TEXTURE0; 367 GLenum m_activeTextureUnit = GL_TEXTURE0;
368 GLfloat m_clearColor[4]; 368 GLfloat m_clearColor[4];
369 GLboolean m_colorMask[4]; 369 GLboolean m_colorMask[4];
370 370
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // used to resize the Canvas. 445 // used to resize the Canvas.
446 SkBitmap m_resizingBitmap; 446 SkBitmap m_resizingBitmap;
447 447
448 // Used to flip a bitmap vertically. 448 // Used to flip a bitmap vertically.
449 Vector<uint8_t> m_scanline; 449 Vector<uint8_t> m_scanline;
450 }; 450 };
451 451
452 } // namespace blink 452 } // namespace blink
453 453
454 #endif // DrawingBuffer_h 454 #endif // DrawingBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698