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

Unified Diff: mojo/services/surfaces/surfaces_impl.cc

Issue 687433002: Remove mojo/shell and (most) service implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove mojo/gles2, disable mojo apps in component build Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/surfaces/surfaces_impl.h ('k') | mojo/services/surfaces/surfaces_service_application.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/surfaces/surfaces_impl.cc
diff --git a/mojo/services/surfaces/surfaces_impl.cc b/mojo/services/surfaces/surfaces_impl.cc
deleted file mode 100644
index e323c0264c7f5a3f36de93197195de1b08983dac..0000000000000000000000000000000000000000
--- a/mojo/services/surfaces/surfaces_impl.cc
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "mojo/services/surfaces/surfaces_impl.h"
-
-#include "cc/output/compositor_frame.h"
-#include "cc/resources/returned_resource.h"
-#include "cc/surfaces/display.h"
-#include "cc/surfaces/surface_id_allocator.h"
-#include "mojo/cc/context_provider_mojo.h"
-#include "mojo/cc/direct_output_surface.h"
-#include "mojo/converters/geometry/geometry_type_converters.h"
-#include "mojo/converters/surfaces/surfaces_type_converters.h"
-
-namespace mojo {
-
-SurfacesImpl::SurfacesImpl(cc::SurfaceManager* manager,
- uint32_t id_namespace,
- Client* client)
- : manager_(manager),
- factory_(manager, this),
- id_namespace_(id_namespace),
- client_(client) {
-}
-
-SurfacesImpl::~SurfacesImpl() {
-}
-
-void SurfacesImpl::CreateSurface(SurfaceIdPtr id, mojo::SizePtr size) {
- cc::SurfaceId cc_id = id.To<cc::SurfaceId>();
- if (cc::SurfaceIdAllocator::NamespaceForId(cc_id) != id_namespace_) {
- // Bad message, do something bad to the caller?
- NOTREACHED();
- return;
- }
- factory_.Create(id.To<cc::SurfaceId>(), size.To<gfx::Size>());
-}
-
-void SurfacesImpl::SubmitFrame(SurfaceIdPtr id, FramePtr frame_ptr) {
- cc::SurfaceId cc_id = id.To<cc::SurfaceId>();
- if (cc::SurfaceIdAllocator::NamespaceForId(cc_id) != id_namespace_) {
- // Bad message, do something bad to the caller?
- LOG(FATAL) << "Received frame for id " << cc_id.id << " namespace "
- << cc::SurfaceIdAllocator::NamespaceForId(cc_id)
- << " should be namespace " << id_namespace_;
- return;
- }
- factory_.SubmitFrame(id.To<cc::SurfaceId>(),
- frame_ptr.To<scoped_ptr<cc::CompositorFrame> >(),
- base::Closure());
- client_->FrameSubmitted();
-}
-
-void SurfacesImpl::DestroySurface(SurfaceIdPtr id) {
- cc::SurfaceId cc_id = id.To<cc::SurfaceId>();
- if (cc::SurfaceIdAllocator::NamespaceForId(cc_id) != id_namespace_) {
- // Bad message, do something bad to the caller?
- NOTREACHED();
- return;
- }
- factory_.Destroy(id.To<cc::SurfaceId>());
-}
-
-void SurfacesImpl::CreateGLES2BoundSurface(CommandBufferPtr gles2_client,
- SurfaceIdPtr id,
- mojo::SizePtr size) {
- command_buffer_handle_ = gles2_client.PassMessagePipe();
-
- cc::SurfaceId cc_id = id.To<cc::SurfaceId>();
- if (cc::SurfaceIdAllocator::NamespaceForId(cc_id) != id_namespace_) {
- // Bad message, do something bad to the caller?
- LOG(FATAL) << "Received request for id " << cc_id.id << " namespace "
- << cc::SurfaceIdAllocator::NamespaceForId(cc_id)
- << " should be namespace " << id_namespace_;
- return;
- }
- if (!display_) {
- display_.reset(new cc::Display(this, manager_, NULL, NULL));
- client_->SetDisplay(display_.get());
- display_->Initialize(make_scoped_ptr(new DirectOutputSurface(
- new ContextProviderMojo(command_buffer_handle_.Pass()))));
- }
- factory_.Create(cc_id, size.To<gfx::Size>());
- display_->Resize(cc_id, size.To<gfx::Size>());
-}
-
-void SurfacesImpl::ReturnResources(const cc::ReturnedResourceArray& resources) {
- Array<ReturnedResourcePtr> ret(resources.size());
- for (size_t i = 0; i < resources.size(); ++i) {
- ret[i] = ReturnedResource::From(resources[i]);
- }
- client()->ReturnResources(ret.Pass());
-}
-
-void SurfacesImpl::DisplayDamaged() {
-}
-
-void SurfacesImpl::DidSwapBuffers() {
-}
-
-void SurfacesImpl::DidSwapBuffersComplete() {
-}
-
-void SurfacesImpl::CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) {
-}
-
-void SurfacesImpl::OutputSurfaceLost() {
-}
-
-void SurfacesImpl::SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) {
-}
-
-} // namespace mojo
« no previous file with comments | « mojo/services/surfaces/surfaces_impl.h ('k') | mojo/services/surfaces/surfaces_service_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698