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

Unified Diff: examples/ganesh_app/texture_uploader.h

Issue 1559723002: Update the UI examples. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-14
Patch Set: address feedback Created 4 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 | « examples/ganesh_app/ganesh_view.cc ('k') | examples/ganesh_app/texture_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/ganesh_app/texture_uploader.h
diff --git a/examples/ganesh_app/texture_uploader.h b/examples/ganesh_app/texture_uploader.h
deleted file mode 100644
index 2b449e5b716c4cff311523a04fc6083d650b98d1..0000000000000000000000000000000000000000
--- a/examples/ganesh_app/texture_uploader.h
+++ /dev/null
@@ -1,69 +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.
-
-#ifndef EXAMPLES_GANESH_APP_TEXTURE_UPLOADER_H_
-#define EXAMPLES_GANESH_APP_TEXTURE_UPLOADER_H_
-
-#include "base/containers/hash_tables.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "mojo/gpu/gl_context.h"
-#include "mojo/gpu/gl_texture.h"
-#include "mojo/public/cpp/bindings/binding.h"
-#include "mojo/services/geometry/interfaces/geometry.mojom.h"
-#include "mojo/services/surfaces/interfaces/surface_id.mojom.h"
-#include "mojo/services/surfaces/interfaces/surfaces.mojom.h"
-
-namespace mojo {
-class Shell;
-}
-
-namespace examples {
-
-class TextureUploader : public mojo::ResourceReturner,
- public mojo::GLContext::Observer {
- public:
- class Client {
- public:
- virtual void OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) = 0;
-
- protected:
- virtual ~Client();
- };
-
- TextureUploader(Client* client,
- mojo::Shell* shell,
- base::WeakPtr<mojo::GLContext> context);
- ~TextureUploader() override;
-
- void Upload(scoped_ptr<mojo::GLTexture> texture);
-
- private:
- // mojo::GLContext::Observer
- void OnContextLost() override;
-
- // mojo::ResourceReturner
- void ReturnResources(
- mojo::Array<mojo::ReturnedResourcePtr> resources) override;
-
- void SetIdNamespace(uint32_t id_namespace);
- void EnsureSurfaceForSize(const mojo::Size& size);
- void SendFullyQualifiedID();
-
- Client* client_;
- base::WeakPtr<mojo::GLContext> context_;
- mojo::SurfacePtr surface_;
- mojo::Size surface_size_;
- uint32_t next_resource_id_;
- uint32_t id_namespace_;
- uint32_t local_id_;
- base::hash_map<uint32_t, mojo::GLTexture*> resource_to_texture_map_;
- mojo::Binding<mojo::ResourceReturner> returner_binding_;
-
- DISALLOW_COPY_AND_ASSIGN(TextureUploader);
-};
-
-} // namespace examples
-
-#endif // EXAMPLES_GANESH_APP_TEXTURE_UPLOADER_H_
« no previous file with comments | « examples/ganesh_app/ganesh_view.cc ('k') | examples/ganesh_app/texture_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698