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

Side by Side Diff: blimp/client/support/compositor/blimp_embedder_compositor.cc

Issue 2349743004: cc: Remove things from OutputSurface and CompositorFrameSink. (Closed)
Patch Set: delete-stuff-cfs: . Created 4 years, 3 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 "blimp/client/support/compositor/blimp_embedder_compositor.h" 5 #include "blimp/client/support/compositor/blimp_embedder_compositor.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "blimp/client/public/compositor/compositor_dependencies.h" 10 #include "blimp/client/public/compositor/compositor_dependencies.h"
(...skipping 24 matching lines...) Expand all
35 base::SimpleThread::Options(base::ThreadPriority::BACKGROUND)); 35 base::SimpleThread::Options(base::ThreadPriority::BACKGROUND));
36 } 36 }
37 37
38 ~SimpleTaskGraphRunner() override { Shutdown(); } 38 ~SimpleTaskGraphRunner() override { Shutdown(); }
39 }; 39 };
40 40
41 class DisplayOutputSurface : public cc::OutputSurface { 41 class DisplayOutputSurface : public cc::OutputSurface {
42 public: 42 public:
43 explicit DisplayOutputSurface( 43 explicit DisplayOutputSurface(
44 scoped_refptr<cc::ContextProvider> context_provider) 44 scoped_refptr<cc::ContextProvider> context_provider)
45 : cc::OutputSurface(std::move(context_provider), nullptr, nullptr) {} 45 : cc::OutputSurface(std::move(context_provider)) {}
46 46
47 ~DisplayOutputSurface() override = default; 47 ~DisplayOutputSurface() override = default;
48 48
49 // cc::OutputSurface implementation 49 // cc::OutputSurface implementation
50 void SwapBuffers(cc::CompositorFrame frame) override { 50 void SwapBuffers(cc::CompositorFrame frame) override {
51 // See cc::OutputSurface::SwapBuffers() comment for details. 51 // See cc::OutputSurface::SwapBuffers() comment for details.
52 context_provider_->ContextSupport()->Swap(); 52 context_provider_->ContextSupport()->Swap();
53 cc::OutputSurface::PostSwapBuffersComplete(); 53 cc::OutputSurface::PostSwapBuffersComplete();
54 } 54 }
55 55
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // The Browser compositor and display share the same context provider. 188 // The Browser compositor and display share the same context provider.
189 auto compositor_frame_sink = base::MakeUnique<cc::DirectCompositorFrameSink>( 189 auto compositor_frame_sink = base::MakeUnique<cc::DirectCompositorFrameSink>(
190 compositor_dependencies_->GetSurfaceManager(), 190 compositor_dependencies_->GetSurfaceManager(),
191 surface_id_allocator_.get(), display_.get(), context_provider_, nullptr); 191 surface_id_allocator_.get(), display_.get(), context_provider_, nullptr);
192 192
193 host_->SetCompositorFrameSink(std::move(compositor_frame_sink)); 193 host_->SetCompositorFrameSink(std::move(compositor_frame_sink));
194 } 194 }
195 195
196 } // namespace client 196 } // namespace client
197 } // namespace blimp 197 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698