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

Side by Side Diff: content/browser/renderer_host/image_transport_client.h

Issue 10689108: Aura: Have ui::Layer implement WebKit::WebExternalTextureLayerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nuke TestImageTransportFactory. Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_CLIENT_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_CLIENT_H_
7
8 #include "base/basictypes.h"
9 #include "ui/compositor/compositor.h"
10 #include "ui/surface/transport_dib.h"
11
12 namespace gfx {
13 class Size;
14 }
15 class ImageTransportFactory;
16
17 // This is a client for ImageTransportSurface, that handles the
18 // platform-specific task of binding the transport surface to a GL texture.
19 // The GL texture is allocated in the ImageTransportFactory context, and the
20 // data is only valid after the first Update().
21 class ImageTransportClient : public ui::Texture {
22 public:
23 // Initializes the client with the surface id.
24 virtual bool Initialize(uint64* surface_handle) = 0;
25
26 // Updates the surface data into the texture.
27 virtual void Update() = 0;
28
29 // Returns the shared memory handle used to transfer software data if needed.
30 // Can be a NULL handle.
31 virtual TransportDIB::Handle Handle() const = 0;
32
33 // Creates a platform-specific client.
34 static ImageTransportClient* Create(ImageTransportFactory* factory,
35 const gfx::Size& size);
36
37 protected:
38 ImageTransportClient(bool flipped, const gfx::Size& size);
39 virtual ~ImageTransportClient() {}
40
41 private:
42 DISALLOW_COPY_AND_ASSIGN(ImageTransportClient);
43 };
44
45 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_CLIENT_H_
46
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698