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: blimp/client/support/compositor/blimp_embedder_compositor.cc

Issue 2403373002: cc: Clean up OutputSurfaceClient. (Closed)
Patch Set: osclient: rebase Created 4 years, 2 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
« no previous file with comments | « no previous file | cc/output/output_surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool SurfaceIsSuspendForRecycle() const override { return false; } 81 bool SurfaceIsSuspendForRecycle() const override { return false; }
82 uint32_t GetFramebufferCopyTextureFormat() override { 82 uint32_t GetFramebufferCopyTextureFormat() override {
83 // We assume we have an alpha channel from the BlimpContextProvider, so use 83 // We assume we have an alpha channel from the BlimpContextProvider, so use
84 // GL_RGBA here. 84 // GL_RGBA here.
85 return GL_RGBA; 85 return GL_RGBA;
86 } 86 }
87 bool HasExternalStencilTest() const override { return false; } 87 bool HasExternalStencilTest() const override { return false; }
88 void ApplyExternalStencil() override {} 88 void ApplyExternalStencil() override {}
89 89
90 private: 90 private:
91 void SwapBuffersCallback() { client_->DidSwapBuffersComplete(); } 91 void SwapBuffersCallback() { client_->DidReceiveSwapBuffersAck(); }
92 92
93 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 93 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
94 base::WeakPtrFactory<DisplayOutputSurface> weak_ptr_factory_; 94 base::WeakPtrFactory<DisplayOutputSurface> weak_ptr_factory_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(DisplayOutputSurface); 96 DISALLOW_COPY_AND_ASSIGN(DisplayOutputSurface);
97 }; 97 };
98 98
99 base::LazyInstance<SimpleTaskGraphRunner> g_task_graph_runner = 99 base::LazyInstance<SimpleTaskGraphRunner> g_task_graph_runner =
100 LAZY_INSTANCE_INITIALIZER; 100 LAZY_INSTANCE_INITIALIZER;
101 101
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // The Browser compositor and display share the same context provider. 220 // The Browser compositor and display share the same context provider.
221 auto compositor_frame_sink = base::MakeUnique<cc::DirectCompositorFrameSink>( 221 auto compositor_frame_sink = base::MakeUnique<cc::DirectCompositorFrameSink>(
222 frame_sink_id_, compositor_dependencies_->GetSurfaceManager(), 222 frame_sink_id_, compositor_dependencies_->GetSurfaceManager(),
223 display_.get(), context_provider_, nullptr); 223 display_.get(), context_provider_, nullptr);
224 224
225 host_->SetCompositorFrameSink(std::move(compositor_frame_sink)); 225 host_->SetCompositorFrameSink(std::move(compositor_frame_sink));
226 } 226 }
227 227
228 } // namespace client 228 } // namespace client
229 } // namespace blimp 229 } // namespace blimp
OLDNEW
« no previous file with comments | « no previous file | cc/output/output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698