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

Side by Side Diff: mojo/services/surfaces/surfaces_impl.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc ('k') | net/BUILD.gn » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/services/surfaces/surfaces_impl.h" 5 #include "mojo/services/surfaces/surfaces_impl.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/resources/returned_resource.h" 8 #include "cc/resources/returned_resource.h"
9 #include "cc/surfaces/display.h" 9 #include "cc/surfaces/display.h"
10 #include "cc/surfaces/surface_id_allocator.h" 10 #include "cc/surfaces/surface_id_allocator.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 cc::SurfaceId cc_id = id.To<cc::SurfaceId>(); 74 cc::SurfaceId cc_id = id.To<cc::SurfaceId>();
75 if (cc::SurfaceIdAllocator::NamespaceForId(cc_id) != id_namespace_) { 75 if (cc::SurfaceIdAllocator::NamespaceForId(cc_id) != id_namespace_) {
76 // Bad message, do something bad to the caller? 76 // Bad message, do something bad to the caller?
77 LOG(FATAL) << "Received request for id " << cc_id.id << " namespace " 77 LOG(FATAL) << "Received request for id " << cc_id.id << " namespace "
78 << cc::SurfaceIdAllocator::NamespaceForId(cc_id) 78 << cc::SurfaceIdAllocator::NamespaceForId(cc_id)
79 << " should be namespace " << id_namespace_; 79 << " should be namespace " << id_namespace_;
80 return; 80 return;
81 } 81 }
82 if (!display_) { 82 if (!display_) {
83 display_.reset(new cc::Display(this, manager_, NULL, NULL)); 83 cc::RendererSettings settings;
84 display_.reset(new cc::Display(this, manager_, nullptr, nullptr, settings));
84 client_->SetDisplay(display_.get()); 85 client_->SetDisplay(display_.get());
85 display_->Initialize(make_scoped_ptr(new DirectOutputSurface( 86 display_->Initialize(make_scoped_ptr(new DirectOutputSurface(
86 new ContextProviderMojo(command_buffer_handle_.Pass())))); 87 new ContextProviderMojo(command_buffer_handle_.Pass()))));
87 } 88 }
88 factory_.Create(cc_id, size.To<gfx::Size>()); 89 factory_.Create(cc_id, size.To<gfx::Size>());
89 display_->Resize(cc_id, size.To<gfx::Size>(), 1.f); 90 display_->Resize(cc_id, size.To<gfx::Size>(), 1.f);
90 } 91 }
91 92
92 void SurfacesImpl::ReturnResources(const cc::ReturnedResourceArray& resources) { 93 void SurfacesImpl::ReturnResources(const cc::ReturnedResourceArray& resources) {
93 Array<ReturnedResourcePtr> ret(resources.size()); 94 Array<ReturnedResourcePtr> ret(resources.size());
(...skipping 16 matching lines...) Expand all
110 base::TimeDelta interval) { 111 base::TimeDelta interval) {
111 } 112 }
112 113
113 void SurfacesImpl::OutputSurfaceLost() { 114 void SurfacesImpl::OutputSurfaceLost() {
114 } 115 }
115 116
116 void SurfacesImpl::SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) { 117 void SurfacesImpl::SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) {
117 } 118 }
118 119
119 } // namespace mojo 120 } // namespace mojo
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc ('k') | net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698