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

Unified Diff: mojo/examples/bitmap_uploader/bitmap_uploader.h

Issue 684543003: Move //mojo/examples to //examples (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/examples/bitmap_uploader/DEPS ('k') | mojo/examples/bitmap_uploader/bitmap_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/bitmap_uploader/bitmap_uploader.h
diff --git a/mojo/examples/bitmap_uploader/bitmap_uploader.h b/mojo/examples/bitmap_uploader/bitmap_uploader.h
deleted file mode 100644
index 56f37fee57f068e6c1e405e3bc3d150d5ac9c8d0..0000000000000000000000000000000000000000
--- a/mojo/examples/bitmap_uploader/bitmap_uploader.h
+++ /dev/null
@@ -1,68 +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 MOJO_EXAMPLES_BITMAP_UPLOADER_BITMAP_UPLOADER_H_
-#define MOJO_EXAMPLES_BITMAP_UPLOADER_BITMAP_UPLOADER_H_
-
-#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "cc/surfaces/surface_id.h"
-#include "mojo/public/c/gles2/gles2.h"
-#include "mojo/services/public/interfaces/gpu/gpu.mojom.h"
-#include "mojo/services/public/interfaces/surfaces/surfaces.mojom.h"
-#include "mojo/services/public/interfaces/surfaces/surfaces_service.mojom.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/gfx/geometry/size.h"
-
-namespace cc {
-class SurfaceIdAllocator;
-}
-
-namespace mojo {
-class Shell;
-class View;
-
-// BitmapUploader is useful if you want to draw a bitmap or color in a View.
-class BitmapUploader : public SurfaceClient {
- public:
- explicit BitmapUploader(View* view);
- virtual ~BitmapUploader();
-
- void Init(Shell* shell);
-
- void SetColor(SkColor color);
- void SetBitmap(const SkBitmap& bitmap);
-
- private:
- void Upload();
- void OnSurfaceConnectionCreated(SurfacePtr surface, uint32_t id_namespace);
- uint32_t BindTextureForSize(const gfx::Size size);
-
- // SurfaceClient implementation.
- virtual void ReturnResources(Array<ReturnedResourcePtr> resources) override;
-
- View* view_;
- SurfacesServicePtr surfaces_service_;
- GpuPtr gpu_service_;
- MojoGLES2Context gles2_context_;
-
- gfx::Size size_;
- SkColor color_;
- SkBitmap bitmap_;
- SurfacePtr surface_;
- cc::SurfaceId id_;
- scoped_ptr<cc::SurfaceIdAllocator> id_allocator_;
- gfx::Size surface_size_;
- uint32_t next_resource_id_;
- base::hash_map<uint32_t, uint32_t> resource_to_texture_id_map_;
-
- base::WeakPtrFactory<BitmapUploader> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(BitmapUploader);
-};
-
-} // namespace mojo
-
-#endif // MOJO_EXAMPLES_BITMAP_UPLOADER_BITMAP_UPLOADER_H_
« no previous file with comments | « mojo/examples/bitmap_uploader/DEPS ('k') | mojo/examples/bitmap_uploader/bitmap_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698