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

Side by Side Diff: components/mus/surfaces/top_level_display_client.cc

Issue 1496103002: Reusing base::IdType<...> to implement SurfaceId. Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-id-base
Patch Set: Rebasing + dusting off... Created 4 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
« no previous file with comments | « components/html_viewer/html_frame.cc ('k') | components/mus/ws/display_manager_delegate.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/mus/surfaces/top_level_display_client.h" 5 #include "components/mus/surfaces/top_level_display_client.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/scheduler/begin_frame_source.h" 9 #include "cc/scheduler/begin_frame_source.h"
10 #include "cc/surfaces/display.h" 10 #include "cc/surfaces/display.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 } 27 }
28 28
29 TopLevelDisplayClient::TopLevelDisplayClient( 29 TopLevelDisplayClient::TopLevelDisplayClient(
30 gfx::AcceleratedWidget widget, 30 gfx::AcceleratedWidget widget,
31 const scoped_refptr<GpuState>& gpu_state, 31 const scoped_refptr<GpuState>& gpu_state,
32 const scoped_refptr<SurfacesState>& surfaces_state) 32 const scoped_refptr<SurfacesState>& surfaces_state)
33 : task_runner_(base::ThreadTaskRunnerHandle::Get()), 33 : task_runner_(base::ThreadTaskRunnerHandle::Get()),
34 surfaces_state_(surfaces_state), 34 surfaces_state_(surfaces_state),
35 factory_(surfaces_state->manager(), this), 35 factory_(surfaces_state->manager(), this),
36 cc_id_(static_cast<uint64_t>(surfaces_state->next_id_namespace()) << 32) { 36 cc_id_(cc::SurfaceId::FromUnsafeValue(
37 static_cast<uint64_t>(surfaces_state->next_id_namespace()) << 32)) {
37 factory_.Create(cc_id_); 38 factory_.Create(cc_id_);
38 39
39 display_.reset(new cc::Display(this, surfaces_state_->manager(), nullptr, 40 display_.reset(new cc::Display(this, surfaces_state_->manager(), nullptr,
40 nullptr, cc::RendererSettings())); 41 nullptr, cc::RendererSettings()));
41 42
42 scoped_ptr<cc::OutputSurface> output_surface = 43 scoped_ptr<cc::OutputSurface> output_surface =
43 make_scoped_ptr(new DirectOutputSurface( 44 make_scoped_ptr(new DirectOutputSurface(
44 new SurfacesContextProvider(this, widget, gpu_state))); 45 new SurfacesContextProvider(this, widget, gpu_state)));
45 46
46 int max_frames_pending = output_surface->capabilities().max_frames_pending; 47 int max_frames_pending = output_surface->capabilities().max_frames_pending;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // TODO(fsamuel): Implement this. 113 // TODO(fsamuel): Implement this.
113 } 114 }
114 115
115 void TopLevelDisplayClient::SetBeginFrameSource( 116 void TopLevelDisplayClient::SetBeginFrameSource(
116 cc::SurfaceId surface_id, 117 cc::SurfaceId surface_id,
117 cc::BeginFrameSource* begin_frame_source) { 118 cc::BeginFrameSource* begin_frame_source) {
118 // TODO(tansell): Implement this. 119 // TODO(tansell): Implement this.
119 } 120 }
120 121
121 } // namespace mus 122 } // namespace mus
OLDNEW
« no previous file with comments | « components/html_viewer/html_frame.cc ('k') | components/mus/ws/display_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698