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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 RefPtr<DrawingBuffer> drawing_buffer = AdoptRef(new DrawingBuffer( | 117 RefPtr<DrawingBuffer> drawing_buffer = AdoptRef(new DrawingBuffer( |
118 std::move(context_provider), std::move(extensions_util), client, | 118 std::move(context_provider), std::move(extensions_util), client, |
119 discard_framebuffer_supported, want_alpha_channel, premultiplied_alpha, | 119 discard_framebuffer_supported, want_alpha_channel, premultiplied_alpha, |
120 preserve, web_gl_version, want_depth_buffer, want_stencil_buffer, | 120 preserve, web_gl_version, want_depth_buffer, want_stencil_buffer, |
121 chromium_image_usage, color_params)); | 121 chromium_image_usage, color_params)); |
122 if (!drawing_buffer->Initialize(size, multisample_supported)) { | 122 if (!drawing_buffer->Initialize(size, multisample_supported)) { |
123 drawing_buffer->BeginDestruction(); | 123 drawing_buffer->BeginDestruction(); |
124 return PassRefPtr<DrawingBuffer>(); | 124 return PassRefPtr<DrawingBuffer>(); |
125 } | 125 } |
126 return drawing_buffer.Release(); | 126 return drawing_buffer; |
127 } | 127 } |
128 | 128 |
129 void DrawingBuffer::ForceNextDrawingBufferCreationToFail() { | 129 void DrawingBuffer::ForceNextDrawingBufferCreationToFail() { |
130 g_should_fail_drawing_buffer_creation_for_testing = true; | 130 g_should_fail_drawing_buffer_creation_for_testing = true; |
131 } | 131 } |
132 | 132 |
133 DrawingBuffer::DrawingBuffer( | 133 DrawingBuffer::DrawingBuffer( |
134 std::unique_ptr<WebGraphicsContext3DProvider> context_provider, | 134 std::unique_ptr<WebGraphicsContext3DProvider> context_provider, |
135 std::unique_ptr<Extensions3DUtil> extensions_util, | 135 std::unique_ptr<Extensions3DUtil> extensions_util, |
136 Client* client, | 136 Client* client, |
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1380 if (pixel_unpack_buffer_binding_dirty_) | 1380 if (pixel_unpack_buffer_binding_dirty_) |
1381 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); | 1381 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); |
1382 } | 1382 } |
1383 | 1383 |
1384 bool DrawingBuffer::ShouldUseChromiumImage() { | 1384 bool DrawingBuffer::ShouldUseChromiumImage() { |
1385 return RuntimeEnabledFeatures::WebGLImageChromiumEnabled() && | 1385 return RuntimeEnabledFeatures::WebGLImageChromiumEnabled() && |
1386 chromium_image_usage_ == kAllowChromiumImage; | 1386 chromium_image_usage_ == kAllowChromiumImage; |
1387 } | 1387 } |
1388 | 1388 |
1389 } // namespace blink | 1389 } // namespace blink |
OLD | NEW |