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

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

Issue 2700123003: DO NOT COMMIT: Results of running old (current) 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 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "platform/graphics/gpu/DrawingBuffer.h" 31 #include "platform/graphics/gpu/DrawingBuffer.h"
32 32
33 #include <algorithm>
34 #include <memory>
33 #include "cc/resources/shared_bitmap.h" 35 #include "cc/resources/shared_bitmap.h"
34 #include "gpu/GLES2/gl2extchromium.h" 36 #include "gpu/GLES2/gl2extchromium.h"
35 #include "gpu/command_buffer/client/gles2_interface.h" 37 #include "gpu/command_buffer/client/gles2_interface.h"
36 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" 38 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
37 #include "gpu/command_buffer/common/capabilities.h" 39 #include "gpu/command_buffer/common/capabilities.h"
38 #include "gpu/command_buffer/common/gpu_memory_buffer_support.h" 40 #include "gpu/command_buffer/common/gpu_memory_buffer_support.h"
39 #include "platform/RuntimeEnabledFeatures.h" 41 #include "platform/RuntimeEnabledFeatures.h"
40 #include "platform/graphics/AcceleratedStaticBitmapImage.h" 42 #include "platform/graphics/AcceleratedStaticBitmapImage.h"
41 #include "platform/graphics/GraphicsLayer.h" 43 #include "platform/graphics/GraphicsLayer.h"
42 #include "platform/graphics/ImageBuffer.h" 44 #include "platform/graphics/ImageBuffer.h"
43 #include "platform/graphics/WebGraphicsContext3DProviderWrapper.h" 45 #include "platform/graphics/WebGraphicsContext3DProviderWrapper.h"
44 #include "platform/graphics/gpu/Extensions3DUtil.h" 46 #include "platform/graphics/gpu/Extensions3DUtil.h"
45 #include "platform/instrumentation/tracing/TraceEvent.h" 47 #include "platform/instrumentation/tracing/TraceEvent.h"
46 #include "public/platform/Platform.h" 48 #include "public/platform/Platform.h"
47 #include "public/platform/WebCompositorSupport.h" 49 #include "public/platform/WebCompositorSupport.h"
48 #include "public/platform/WebExternalBitmap.h" 50 #include "public/platform/WebExternalBitmap.h"
49 #include "public/platform/WebExternalTextureLayer.h" 51 #include "public/platform/WebExternalTextureLayer.h"
50 #include "skia/ext/texture_handle.h" 52 #include "skia/ext/texture_handle.h"
51 #include "third_party/skia/include/gpu/GrContext.h" 53 #include "third_party/skia/include/gpu/GrContext.h"
52 #include "third_party/skia/include/gpu/gl/GrGLTypes.h" 54 #include "third_party/skia/include/gpu/gl/GrGLTypes.h"
53 #include "wtf/CheckedNumeric.h" 55 #include "wtf/CheckedNumeric.h"
54 #include "wtf/typed_arrays/ArrayBufferContents.h" 56 #include "wtf/typed_arrays/ArrayBufferContents.h"
55 #include <algorithm>
56 #include <memory>
57 57
58 namespace blink { 58 namespace blink {
59 59
60 namespace { 60 namespace {
61 61
62 const float s_resourceAdjustedRatio = 0.5; 62 const float s_resourceAdjustedRatio = 0.5;
63 63
64 static bool shouldFailDrawingBufferCreationForTesting = false; 64 static bool shouldFailDrawingBufferCreationForTesting = false;
65 65
66 } // namespace 66 } // namespace
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 if (m_pixelUnpackBufferBindingDirty) 1292 if (m_pixelUnpackBufferBindingDirty)
1293 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); 1293 client->DrawingBufferClientRestorePixelUnpackBufferBinding();
1294 } 1294 }
1295 1295
1296 bool DrawingBuffer::shouldUseChromiumImage() { 1296 bool DrawingBuffer::shouldUseChromiumImage() {
1297 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && 1297 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() &&
1298 m_chromiumImageUsage == AllowChromiumImage; 1298 m_chromiumImageUsage == AllowChromiumImage;
1299 } 1299 }
1300 1300
1301 } // namespace blink 1301 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698