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

Side by Side Diff: content/browser/aura/image_transport_factory.h

Issue 111063003: Aura: Don't create GL context for CreateSharedSurfaceHandle() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try to make tests happy by still creating shared context Created 6 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) 2012 The Chromium Authors. All rights reserved. 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 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_AURA_IMAGE_TRANSPORT_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_
6 #define CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_ 6 #define CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // Terminates the global transport factory. 61 // Terminates the global transport factory.
62 static void Terminate(); 62 static void Terminate();
63 63
64 // Gets the factory instance. 64 // Gets the factory instance.
65 static ImageTransportFactory* GetInstance(); 65 static ImageTransportFactory* GetInstance();
66 66
67 // Gets the image transport factory as a context factory for the compositor. 67 // Gets the image transport factory as a context factory for the compositor.
68 virtual ui::ContextFactory* AsContextFactory() = 0; 68 virtual ui::ContextFactory* AsContextFactory() = 0;
69 69
70 // Creates a shared surface handle. 70 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() = 0;
71 // Note: the handle may get lost at any time, a state that an
72 // ImageTransportFactoryObserver gets notified of.
73 virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() = 0;
74
75 // Destroys a shared surface handle.
76 virtual void DestroySharedSurfaceHandle(gfx::GLSurfaceHandle surface) = 0;
77 71
78 // Creates a transport texture for a given scale factor. 72 // Creates a transport texture for a given scale factor.
79 virtual scoped_refptr<ui::Texture> CreateTransportClient( 73 virtual scoped_refptr<ui::Texture> CreateTransportClient(
80 float device_scale_factor) = 0; 74 float device_scale_factor) = 0;
81 75
82 // Variant of CreateTransportClient() that deletes the texture on the GPU when 76 // Variant of CreateTransportClient() that deletes the texture on the GPU when
83 // the returned value is deleted. 77 // the returned value is deleted.
84 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( 78 virtual scoped_refptr<ui::Texture> CreateOwnedTexture(
85 const gfx::Size& size, 79 const gfx::Size& size,
86 float device_scale_factor, 80 float device_scale_factor,
87 unsigned int texture_id) = 0; 81 unsigned int texture_id) = 0;
88 82
89 // Gets a GLHelper instance, associated with the shared context. This 83 // Gets a GLHelper instance, associated with the shared context. This
90 // GLHelper will get destroyed whenever the shared context is lost 84 // GLHelper will get destroyed whenever the shared context is lost
91 // (ImageTransportFactoryObserver::OnLostResources is called). 85 // (ImageTransportFactoryObserver::OnLostResources is called).
92 virtual GLHelper* GetGLHelper() = 0; 86 virtual GLHelper* GetGLHelper() = 0;
93 87
94 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; 88 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0;
95 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; 89 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0;
96 }; 90 };
97 91
98 } // namespace content 92 } // namespace content
99 93
100 #endif // CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_ 94 #endif // CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/aura/gpu_process_transport_factory.cc ('k') | content/browser/aura/no_transport_image_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698