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

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

Issue 2781823002: Revert of cc/paint: Remove cc::PaintSurface. (Closed)
Patch Set: Created 3 years, 9 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>
35 #include "cc/resources/shared_bitmap.h" 33 #include "cc/resources/shared_bitmap.h"
36 #include "gpu/GLES2/gl2extchromium.h" 34 #include "gpu/GLES2/gl2extchromium.h"
37 #include "gpu/command_buffer/client/gles2_interface.h" 35 #include "gpu/command_buffer/client/gles2_interface.h"
38 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" 36 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
39 #include "gpu/command_buffer/common/capabilities.h" 37 #include "gpu/command_buffer/common/capabilities.h"
40 #include "gpu/command_buffer/common/gpu_memory_buffer_support.h" 38 #include "gpu/command_buffer/common/gpu_memory_buffer_support.h"
41 #include "platform/RuntimeEnabledFeatures.h" 39 #include "platform/RuntimeEnabledFeatures.h"
42 #include "platform/graphics/AcceleratedStaticBitmapImage.h" 40 #include "platform/graphics/AcceleratedStaticBitmapImage.h"
43 #include "platform/graphics/GraphicsLayer.h" 41 #include "platform/graphics/GraphicsLayer.h"
44 #include "platform/graphics/ImageBuffer.h" 42 #include "platform/graphics/ImageBuffer.h"
45 #include "platform/graphics/WebGraphicsContext3DProviderWrapper.h" 43 #include "platform/graphics/WebGraphicsContext3DProviderWrapper.h"
46 #include "platform/graphics/gpu/Extensions3DUtil.h" 44 #include "platform/graphics/gpu/Extensions3DUtil.h"
47 #include "platform/instrumentation/tracing/TraceEvent.h" 45 #include "platform/instrumentation/tracing/TraceEvent.h"
48 #include "public/platform/Platform.h" 46 #include "public/platform/Platform.h"
49 #include "public/platform/WebCompositorSupport.h" 47 #include "public/platform/WebCompositorSupport.h"
50 #include "public/platform/WebExternalBitmap.h" 48 #include "public/platform/WebExternalBitmap.h"
51 #include "public/platform/WebExternalTextureLayer.h" 49 #include "public/platform/WebExternalTextureLayer.h"
52 #include "skia/ext/texture_handle.h" 50 #include "skia/ext/texture_handle.h"
53 #include "third_party/skia/include/core/SkSurface.h"
54 #include "third_party/skia/include/gpu/GrContext.h" 51 #include "third_party/skia/include/gpu/GrContext.h"
55 #include "third_party/skia/include/gpu/gl/GrGLTypes.h" 52 #include "third_party/skia/include/gpu/gl/GrGLTypes.h"
56 #include "wtf/CheckedNumeric.h" 53 #include "wtf/CheckedNumeric.h"
57 #include "wtf/typed_arrays/ArrayBufferContents.h" 54 #include "wtf/typed_arrays/ArrayBufferContents.h"
55 #include <algorithm>
56 #include <memory>
58 57
59 namespace blink { 58 namespace blink {
60 59
61 namespace { 60 namespace {
62 61
63 const float s_resourceAdjustedRatio = 0.5; 62 const float s_resourceAdjustedRatio = 0.5;
64 63
65 static bool shouldFailDrawingBufferCreationForTesting = false; 64 static bool shouldFailDrawingBufferCreationForTesting = false;
66 65
67 } // namespace 66 } // namespace
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 if (m_pixelUnpackBufferBindingDirty) 1292 if (m_pixelUnpackBufferBindingDirty)
1294 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); 1293 client->DrawingBufferClientRestorePixelUnpackBufferBinding();
1295 } 1294 }
1296 1295
1297 bool DrawingBuffer::shouldUseChromiumImage() { 1296 bool DrawingBuffer::shouldUseChromiumImage() {
1298 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && 1297 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() &&
1299 m_chromiumImageUsage == AllowChromiumImage; 1298 m_chromiumImageUsage == AllowChromiumImage;
1300 } 1299 }
1301 1300
1302 } // namespace blink 1301 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698