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

Side by Side Diff: content/browser/aura/no_transport_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
6 #define CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_ 6 #define CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/aura/image_transport_factory.h" 9 #include "content/browser/aura/image_transport_factory.h"
10 10
11 namespace cc { 11 namespace cc {
12 class ContextProvider; 12 class ContextProvider;
13 } 13 }
14 14
15 namespace content { 15 namespace content {
16 16
17 // An ImageTransportFactory that disables transport. 17 // An ImageTransportFactory that disables transport.
18 class NoTransportImageTransportFactory : public ImageTransportFactory { 18 class NoTransportImageTransportFactory : public ImageTransportFactory {
19 public: 19 public:
20 explicit NoTransportImageTransportFactory( 20 explicit NoTransportImageTransportFactory(
21 scoped_ptr<ui::ContextFactory> context_factory); 21 scoped_ptr<ui::ContextFactory> context_factory);
22 virtual ~NoTransportImageTransportFactory(); 22 virtual ~NoTransportImageTransportFactory();
23 23
24 // ImageTransportFactory implementation. 24 // ImageTransportFactory implementation.
25 virtual ui::ContextFactory* AsContextFactory() OVERRIDE; 25 virtual ui::ContextFactory* AsContextFactory() OVERRIDE;
26 virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() OVERRIDE; 26 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() OVERRIDE;
27 virtual void DestroySharedSurfaceHandle(gfx::GLSurfaceHandle surface)
28 OVERRIDE;
29 virtual scoped_refptr<ui::Texture> CreateTransportClient( 27 virtual scoped_refptr<ui::Texture> CreateTransportClient(
30 float device_scale_factor) OVERRIDE; 28 float device_scale_factor) OVERRIDE;
31 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( 29 virtual scoped_refptr<ui::Texture> CreateOwnedTexture(
32 const gfx::Size& size, 30 const gfx::Size& size,
33 float device_scale_factor, 31 float device_scale_factor,
34 unsigned int texture_id) OVERRIDE; 32 unsigned int texture_id) OVERRIDE;
35 virtual GLHelper* GetGLHelper() OVERRIDE; 33 virtual GLHelper* GetGLHelper() OVERRIDE;
36 virtual void AddObserver(ImageTransportFactoryObserver* observer) OVERRIDE; 34 virtual void AddObserver(ImageTransportFactoryObserver* observer) OVERRIDE;
37 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) OVERRIDE; 35 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) OVERRIDE;
38 36
39 private: 37 private:
40 scoped_ptr<ui::ContextFactory> context_factory_; 38 scoped_ptr<ui::ContextFactory> context_factory_;
41 scoped_refptr<cc::ContextProvider> context_provider_; 39 scoped_refptr<cc::ContextProvider> context_provider_;
42 scoped_ptr<GLHelper> gl_helper_; 40 scoped_ptr<GLHelper> gl_helper_;
43 41
44 DISALLOW_COPY_AND_ASSIGN(NoTransportImageTransportFactory); 42 DISALLOW_COPY_AND_ASSIGN(NoTransportImageTransportFactory);
45 }; 43 };
46 44
47 } // namespace content 45 } // namespace content
48 46
49 #endif // CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_ 47 #endif // CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/aura/image_transport_factory.h ('k') | content/browser/aura/no_transport_image_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698