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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h" 5 #include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/quads/texture_draw_quad.h" 8 #include "cc/quads/texture_draw_quad.h"
9 #include "gpu/command_buffer/client/gles2_interface.h" 9 #include "gpu/command_buffer/client/gles2_interface.h"
10 #include "platform/CrossThreadFunctional.h" 10 #include "platform/CrossThreadFunctional.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 DCHECK(!m_sink.is_bound()); 50 DCHECK(!m_sink.is_bound());
51 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider; 51 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider;
52 Platform::current()->interfaceProvider()->getInterface( 52 Platform::current()->interfaceProvider()->getInterface(
53 mojo::MakeRequest(&provider)); 53 mojo::MakeRequest(&provider));
54 provider->CreateCompositorFrameSink(m_frameSinkId, 54 provider->CreateCompositorFrameSink(m_frameSinkId,
55 m_binding.CreateInterfacePtrAndBind(), 55 m_binding.CreateInterfacePtrAndBind(),
56 mojo::MakeRequest(&m_sink)); 56 mojo::MakeRequest(&m_sink));
57 } 57 }
58 } 58 }
59 59
60 OffscreenCanvasFrameDispatcherImpl::~OffscreenCanvasFrameDispatcherImpl() { 60 OffscreenCanvasFrameDispatcherImpl::~OffscreenCanvasFrameDispatcherImpl() {}
61 }
62 61
63 void OffscreenCanvasFrameDispatcherImpl::setTransferableResourceToSharedBitmap( 62 void OffscreenCanvasFrameDispatcherImpl::setTransferableResourceToSharedBitmap(
64 cc::TransferableResource& resource, 63 cc::TransferableResource& resource,
65 RefPtr<StaticBitmapImage> image) { 64 RefPtr<StaticBitmapImage> image) {
66 std::unique_ptr<cc::SharedBitmap> bitmap = 65 std::unique_ptr<cc::SharedBitmap> bitmap =
67 Platform::current()->allocateSharedBitmap(IntSize(m_width, m_height)); 66 Platform::current()->allocateSharedBitmap(IntSize(m_width, m_height));
68 if (!bitmap) 67 if (!bitmap)
69 return; 68 return;
70 unsigned char* pixels = bitmap->pixels(); 69 unsigned char* pixels = bitmap->pixels();
71 DCHECK(pixels); 70 DCHECK(pixels);
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 440
442 void OffscreenCanvasFrameDispatcherImpl::reshape(int width, int height) { 441 void OffscreenCanvasFrameDispatcherImpl::reshape(int width, int height) {
443 if (m_width != width || m_height != height) { 442 if (m_width != width || m_height != height) {
444 m_width = width; 443 m_width = width;
445 m_height = height; 444 m_height = height;
446 m_changeSizeForNextCommit = true; 445 m_changeSizeForNextCommit = true;
447 } 446 }
448 } 447 }
449 448
450 } // namespace blink 449 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698