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

Side by Side Diff: content/browser/aura/no_transport_image_transport_factory.cc

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 #include "content/browser/aura/no_transport_image_transport_factory.h" 5 #include "content/browser/aura/no_transport_image_transport_factory.h"
6 6
7 #include "cc/output/context_provider.h" 7 #include "cc/output/context_provider.h"
8 #include "content/common/gpu/client/gl_helper.h" 8 #include "content/common/gpu/client/gl_helper.h"
9 #include "gpu/command_buffer/client/gles2_interface.h" 9 #include "gpu/command_buffer/client/gles2_interface.h"
10 #include "ui/compositor/compositor.h" 10 #include "ui/compositor/compositor.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 scoped_ptr<ui::ContextFactory> context_factory) 46 scoped_ptr<ui::ContextFactory> context_factory)
47 : context_factory_(context_factory.Pass()) {} 47 : context_factory_(context_factory.Pass()) {}
48 48
49 NoTransportImageTransportFactory::~NoTransportImageTransportFactory() {} 49 NoTransportImageTransportFactory::~NoTransportImageTransportFactory() {}
50 50
51 ui::ContextFactory* NoTransportImageTransportFactory::AsContextFactory() { 51 ui::ContextFactory* NoTransportImageTransportFactory::AsContextFactory() {
52 return context_factory_.get(); 52 return context_factory_.get();
53 } 53 }
54 54
55 gfx::GLSurfaceHandle 55 gfx::GLSurfaceHandle
56 NoTransportImageTransportFactory::CreateSharedSurfaceHandle() { 56 NoTransportImageTransportFactory::GetSharedSurfaceHandle() {
57 return gfx::GLSurfaceHandle(); 57 return gfx::GLSurfaceHandle();
58 } 58 }
59 59
60 void NoTransportImageTransportFactory::DestroySharedSurfaceHandle(
61 gfx::GLSurfaceHandle surface) {}
62
63 scoped_refptr<ui::Texture> 60 scoped_refptr<ui::Texture>
64 NoTransportImageTransportFactory::CreateTransportClient( 61 NoTransportImageTransportFactory::CreateTransportClient(
65 float device_scale_factor) { 62 float device_scale_factor) {
66 return new FakeTexture(context_factory_->SharedMainThreadContextProvider(), 63 return new FakeTexture(context_factory_->SharedMainThreadContextProvider(),
67 device_scale_factor); 64 device_scale_factor);
68 } 65 }
69 66
70 scoped_refptr<ui::Texture> NoTransportImageTransportFactory::CreateOwnedTexture( 67 scoped_refptr<ui::Texture> NoTransportImageTransportFactory::CreateOwnedTexture(
71 const gfx::Size& size, 68 const gfx::Size& size,
72 float device_scale_factor, 69 float device_scale_factor,
(...skipping 12 matching lines...) Expand all
85 82
86 // We don't generate lost context events, so we don't need to keep track of 83 // We don't generate lost context events, so we don't need to keep track of
87 // observers 84 // observers
88 void NoTransportImageTransportFactory::AddObserver( 85 void NoTransportImageTransportFactory::AddObserver(
89 ImageTransportFactoryObserver* observer) {} 86 ImageTransportFactoryObserver* observer) {}
90 87
91 void NoTransportImageTransportFactory::RemoveObserver( 88 void NoTransportImageTransportFactory::RemoveObserver(
92 ImageTransportFactoryObserver* observer) {} 89 ImageTransportFactoryObserver* observer) {}
93 90
94 } // namespace content 91 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/aura/no_transport_image_transport_factory.h ('k') | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698