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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 std::unique_ptr<Extensions3DUtil> extensionsUtil = 87 std::unique_ptr<Extensions3DUtil> extensionsUtil =
88 Extensions3DUtil::create(contextProvider->contextGL()); 88 Extensions3DUtil::create(contextProvider->contextGL());
89 if (!extensionsUtil->isValid()) { 89 if (!extensionsUtil->isValid()) {
90 // This might be the first time we notice that the GL context is lost. 90 // This might be the first time we notice that the GL context is lost.
91 return nullptr; 91 return nullptr;
92 } 92 }
93 ASSERT(extensionsUtil->supportsExtension("GL_OES_packed_depth_stencil")); 93 ASSERT(extensionsUtil->supportsExtension("GL_OES_packed_depth_stencil"));
94 extensionsUtil->ensureExtensionEnabled("GL_OES_packed_depth_stencil"); 94 extensionsUtil->ensureExtensionEnabled("GL_OES_packed_depth_stencil");
95 bool multisampleSupported = 95 bool multisampleSupported =
96 wantAntialiasing && (extensionsUtil->supportsExtension( 96 wantAntialiasing &&
97 "GL_CHROMIUM_framebuffer_multisample") || 97 (extensionsUtil->supportsExtension(
98 extensionsUtil->supportsExtension( 98 "GL_CHROMIUM_framebuffer_multisample") ||
99 "GL_EXT_multisampled_render_to_texture")) && 99 extensionsUtil->supportsExtension(
100 "GL_EXT_multisampled_render_to_texture")) &&
100 extensionsUtil->supportsExtension("GL_OES_rgb8_rgba8"); 101 extensionsUtil->supportsExtension("GL_OES_rgb8_rgba8");
101 if (multisampleSupported) { 102 if (multisampleSupported) {
102 extensionsUtil->ensureExtensionEnabled("GL_OES_rgb8_rgba8"); 103 extensionsUtil->ensureExtensionEnabled("GL_OES_rgb8_rgba8");
103 if (extensionsUtil->supportsExtension( 104 if (extensionsUtil->supportsExtension(
104 "GL_CHROMIUM_framebuffer_multisample")) 105 "GL_CHROMIUM_framebuffer_multisample"))
105 extensionsUtil->ensureExtensionEnabled( 106 extensionsUtil->ensureExtensionEnabled(
106 "GL_CHROMIUM_framebuffer_multisample"); 107 "GL_CHROMIUM_framebuffer_multisample");
107 else 108 else
108 extensionsUtil->ensureExtensionEnabled( 109 extensionsUtil->ensureExtensionEnabled(
109 "GL_EXT_multisampled_render_to_texture"); 110 "GL_EXT_multisampled_render_to_texture");
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 if (m_pixelUnpackBufferBindingDirty) 1293 if (m_pixelUnpackBufferBindingDirty)
1293 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); 1294 client->DrawingBufferClientRestorePixelUnpackBufferBinding();
1294 } 1295 }
1295 1296
1296 bool DrawingBuffer::shouldUseChromiumImage() { 1297 bool DrawingBuffer::shouldUseChromiumImage() {
1297 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && 1298 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() &&
1298 m_chromiumImageUsage == AllowChromiumImage; 1299 m_chromiumImageUsage == AllowChromiumImage;
1299 } 1300 }
1300 1301
1301 } // namespace blink 1302 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698