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

Unified Diff: mojo/cc/output_surface_mojo.cc

Issue 826423008: Use local ids for Surfaces APIs that can only apply to local surfaces (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/cc/output_surface_mojo.h ('k') | mojo/services/surfaces/public/interfaces/surface_id.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/cc/output_surface_mojo.cc
diff --git a/mojo/cc/output_surface_mojo.cc b/mojo/cc/output_surface_mojo.cc
deleted file mode 100644
index 99789925ce3acf303c7b6fc0804b7d68681f35bc..0000000000000000000000000000000000000000
--- a/mojo/cc/output_surface_mojo.cc
+++ /dev/null
@@ -1,61 +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/cc/output_surface_mojo.h"
-
-#include "cc/output/compositor_frame.h"
-#include "cc/output/output_surface_client.h"
-#include "mojo/converters/geometry/geometry_type_converters.h"
-#include "mojo/converters/surfaces/surfaces_type_converters.h"
-
-namespace mojo {
-
-OutputSurfaceMojo::OutputSurfaceMojo(
- OutputSurfaceMojoClient* client,
- const scoped_refptr<cc::ContextProvider>& context_provider,
- SurfacePtr surface,
- uint32_t id_namespace)
- : cc::OutputSurface(context_provider),
- output_surface_mojo_client_(client),
- surface_(surface.Pass()),
- id_allocator_(id_namespace) {
- capabilities_.delegated_rendering = true;
- capabilities_.max_frames_pending = 1;
-}
-
-OutputSurfaceMojo::~OutputSurfaceMojo() {
-}
-
-void OutputSurfaceMojo::SetIdNamespace(uint32_t id_namespace) {
-}
-
-void OutputSurfaceMojo::ReturnResources(Array<ReturnedResourcePtr> resources) {
-}
-
-bool OutputSurfaceMojo::BindToClient(cc::OutputSurfaceClient* client) {
- surface_.set_client(this);
- return cc::OutputSurface::BindToClient(client);
-}
-
-void OutputSurfaceMojo::SwapBuffers(cc::CompositorFrame* frame) {
- gfx::Size frame_size =
- frame->delegated_frame_data->render_pass_list.back()->output_rect.size();
- if (frame_size != surface_size_) {
- if (!surface_id_.is_null()) {
- surface_->DestroySurface(SurfaceId::From(surface_id_));
- }
- surface_id_ = id_allocator_.GenerateId();
- surface_->CreateSurface(SurfaceId::From(surface_id_));
- output_surface_mojo_client_->DidCreateSurface(surface_id_);
- surface_size_ = frame_size;
- }
-
- surface_->SubmitFrame(SurfaceId::From(surface_id_), Frame::From(*frame),
- mojo::Closure());
-
- client_->DidSwapBuffers();
- client_->DidSwapBuffersComplete();
-}
-
-} // namespace mojo
« no previous file with comments | « mojo/cc/output_surface_mojo.h ('k') | mojo/services/surfaces/public/interfaces/surface_id.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698