OLD | NEW |
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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 bool texture_binding_dirty_ = false; | 286 bool texture_binding_dirty_ = false; |
287 bool renderbuffer_binding_dirty_ = false; | 287 bool renderbuffer_binding_dirty_ = false; |
288 bool framebuffer_binding_dirty_ = false; | 288 bool framebuffer_binding_dirty_ = false; |
289 bool pixel_unpack_buffer_binding_dirty_ = false; | 289 bool pixel_unpack_buffer_binding_dirty_ = false; |
290 }; | 290 }; |
291 | 291 |
292 // All parameters necessary to generate the texture for the ColorBuffer. | 292 // All parameters necessary to generate the texture for the ColorBuffer. |
293 struct ColorBufferParameters { | 293 struct ColorBufferParameters { |
294 DISALLOW_NEW(); | 294 DISALLOW_NEW(); |
295 GLenum target = 0; | 295 GLenum target = 0; |
296 GLenum internal_color_format = 0; | 296 bool allocate_alpha_channel = false; |
297 | |
298 // The internal color format used when allocating storage for the | |
299 // texture. This may be different from internalColorFormat if RGB | |
300 // emulation is required. | |
301 GLenum creation_internal_color_format = 0; | |
302 GLenum color_format = 0; | |
303 }; | 297 }; |
304 | 298 |
305 struct ColorBuffer : public RefCounted<ColorBuffer> { | 299 struct ColorBuffer : public RefCounted<ColorBuffer> { |
306 ColorBuffer(DrawingBuffer*, | 300 ColorBuffer(DrawingBuffer*, |
307 const ColorBufferParameters&, | 301 const ColorBufferParameters&, |
308 const IntSize&, | 302 const IntSize&, |
309 GLuint texture_id, | 303 GLuint texture_id, |
310 GLuint image_id, | 304 GLuint image_id, |
311 std::unique_ptr<gfx::GpuMemoryBuffer>); | 305 std::unique_ptr<gfx::GpuMemoryBuffer>); |
312 ~ColorBuffer(); | 306 ~ColorBuffer(); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 // RuntimeEnabledFeatures::webGLImageChromiumEnabled() call with | 525 // RuntimeEnabledFeatures::webGLImageChromiumEnabled() call with |
532 // shouldUseChromiumImage() calls, and set m_chromiumImageUsage to | 526 // shouldUseChromiumImage() calls, and set m_chromiumImageUsage to |
533 // DisallowChromiumImage in the case of OffscreenCanvas. | 527 // DisallowChromiumImage in the case of OffscreenCanvas. |
534 ChromiumImageUsage chromium_image_usage_; | 528 ChromiumImageUsage chromium_image_usage_; |
535 bool ShouldUseChromiumImage(); | 529 bool ShouldUseChromiumImage(); |
536 }; | 530 }; |
537 | 531 |
538 } // namespace blink | 532 } // namespace blink |
539 | 533 |
540 #endif // DrawingBuffer_h | 534 #endif // DrawingBuffer_h |
OLD | NEW |