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

Unified Diff: services/ui/demo/bitmap_uploader.h

Issue 2440453002: Splitting the Mus demo code out of a service. (Closed)
Patch Set: Addressed @sky comments and synced Created 4 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 | « services/ui/demo/BUILD.gn ('k') | services/ui/demo/bitmap_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/demo/bitmap_uploader.h
diff --git a/services/ui/demo/bitmap_uploader.h b/services/ui/demo/bitmap_uploader.h
index f2418e5e6059d37a120b427c1182ff6775230d8a..c7205e051ac3bd36ba69566e53daaabdb12d5357 100644
--- a/services/ui/demo/bitmap_uploader.h
+++ b/services/ui/demo/bitmap_uploader.h
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/containers/hash_tables.h"
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "cc/output/compositor_frame_sink_client.h"
#include "gpu/GLES2/gl2chromium.h"
#include "gpu/GLES2/gl2extchromium.h"
@@ -19,6 +20,10 @@
#include "services/ui/public/cpp/window_surface.h"
#include "services/ui/public/cpp/window_surface_client.h"
+namespace gpu {
+class GpuChannelHost;
+}
+
namespace ui {
class GLES2Context;
class GpuService;
@@ -50,6 +55,8 @@ class BitmapUploader : public cc::CompositorFrameSinkClient {
private:
void Upload();
+ void OnGpuChannelEstablished(scoped_refptr<gpu::GpuChannelHost> gpu_channel);
+
uint32_t BindTextureForSize(const gfx::Size& size);
uint32_t TextureFormat() const {
@@ -83,6 +90,8 @@ class BitmapUploader : public cc::CompositorFrameSinkClient {
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);
};
« no previous file with comments | « services/ui/demo/BUILD.gn ('k') | services/ui/demo/bitmap_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698