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

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

Issue 9194005: gpu: reference target surfaces through a globally unique surface id. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix more tests Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_CLIENT_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_CLIENT_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_CLIENT_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/gfx/compositor/compositor.h" 10 #include "ui/gfx/compositor/compositor.h"
11 #include "ui/gfx/surface/transport_dib.h" 11 #include "ui/gfx/surface/transport_dib.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Size; 14 class Size;
15 } 15 }
16 16
17 // This is a client for ImageTransportSurface, that handles the 17 // This is a client for ImageTransportSurface, that handles the
18 // platform-specific task of binding the transport surface to a GL texture. 18 // platform-specific task of binding the transport surface to a GL texture.
19 // The GL texture is allocated in the SharedResources context, and the data is 19 // The GL texture is allocated in the SharedResources context, and the data is
20 // only valid between Acquire and Release. 20 // only valid between Acquire and Release.
21 class ImageTransportClient { 21 class ImageTransportClient {
22 public: 22 public:
23 virtual ~ImageTransportClient() {} 23 virtual ~ImageTransportClient() {}
24 24
25 // Initializes the client with the surface id. This returns the GL texture id, 25 // Initializes the client with the surface id. This returns the GL texture id,
26 // or 0 if error. 26 // or 0 if error.
27 virtual unsigned int Initialize(uint64* surface_id) = 0; 27 virtual unsigned int Initialize(uint64* surface_handle) = 0;
28 28
29 // Gets the surface data into the texture. 29 // Gets the surface data into the texture.
30 virtual void Acquire() = 0; 30 virtual void Acquire() = 0;
31 31
32 // Releases the surface data. 32 // Releases the surface data.
33 virtual void Release() = 0; 33 virtual void Release() = 0;
34 34
35 // Returns whether the data is flipped in the Y direction. 35 // Returns whether the data is flipped in the Y direction.
36 virtual bool Flipped() = 0; 36 virtual bool Flipped() = 0;
37 37
38 // Returns the shared memory handle used to transfer software data if needed. 38 // Returns the shared memory handle used to transfer software data if needed.
39 // Can be a NULL handle. 39 // Can be a NULL handle.
40 virtual TransportDIB::Handle Handle() const = 0; 40 virtual TransportDIB::Handle Handle() const = 0;
41 41
42 // Creates a platform-specific client. 42 // Creates a platform-specific client.
43 static ImageTransportClient* Create(ui::SharedResources* resources, 43 static ImageTransportClient* Create(ui::SharedResources* resources,
44 const gfx::Size& size); 44 const gfx::Size& size);
45 }; 45 };
46 46
47 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_CLIENT_H_ 47 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_CLIENT_H_
48 48
OLDNEW
« no previous file with comments | « content/browser/renderer_host/gpu_message_filter.cc ('k') | content/browser/renderer_host/image_transport_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698