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

Side by Side Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 10696221: Aura: Less image transport IPCs and less code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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
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 #include "content/browser/renderer_host/image_transport_factory.h" 5 #include "content/browser/renderer_host/image_transport_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 ui::Compositor* compositor) OVERRIDE { 50 ui::Compositor* compositor) OVERRIDE {
51 return gfx::GLSurfaceHandle(); 51 return gfx::GLSurfaceHandle();
52 } 52 }
53 53
54 virtual void DestroySharedSurfaceHandle( 54 virtual void DestroySharedSurfaceHandle(
55 gfx::GLSurfaceHandle surface) OVERRIDE { 55 gfx::GLSurfaceHandle surface) OVERRIDE {
56 } 56 }
57 57
58 virtual scoped_refptr<ui::Texture> CreateTransportClient( 58 virtual scoped_refptr<ui::Texture> CreateTransportClient(
59 const gfx::Size& size, 59 const gfx::Size& size,
60 uint64* transport_handle, 60 uint64 transport_handle,
61 ui::Compositor* compositor) OVERRIDE { 61 ui::Compositor* compositor) OVERRIDE {
62 return NULL; 62 return NULL;
63 } 63 }
64 64
65 virtual GLHelper* GetGLHelper(ui::Compositor* compositor) OVERRIDE { 65 virtual GLHelper* GetGLHelper(ui::Compositor* compositor) OVERRIDE {
66 return NULL; 66 return NULL;
67 } 67 }
68 68
69 virtual uint32 InsertSyncPoint(ui::Compositor* compositor) OVERRIDE { 69 virtual uint32 InsertSyncPoint(ui::Compositor* compositor) OVERRIDE {
70 return 0; 70 return 0;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 data->shared_context->deleteTexture(surface.parent_texture_id[0]); 214 data->shared_context->deleteTexture(surface.parent_texture_id[0]);
215 data->shared_context->deleteTexture(surface.parent_texture_id[1]); 215 data->shared_context->deleteTexture(surface.parent_texture_id[1]);
216 data->shared_context->flush(); 216 data->shared_context->flush();
217 break; 217 break;
218 } 218 }
219 } 219 }
220 } 220 }
221 221
222 virtual scoped_refptr<ui::Texture> CreateTransportClient( 222 virtual scoped_refptr<ui::Texture> CreateTransportClient(
223 const gfx::Size& size, 223 const gfx::Size& size,
224 uint64* transport_handle, 224 uint64 transport_handle,
225 ui::Compositor* compositor) { 225 ui::Compositor* compositor) {
226 PerCompositorData* data = per_compositor_data_[compositor]; 226 PerCompositorData* data = per_compositor_data_[compositor];
227 DCHECK(data); 227 DCHECK(data);
228 scoped_refptr<ImageTransportClientTexture> image( 228 scoped_refptr<ImageTransportClientTexture> image(
229 new ImageTransportClientTexture(data->shared_context.get(), 229 new ImageTransportClientTexture(data->shared_context.get(),
230 size, *transport_handle)); 230 size, transport_handle));
231 return image; 231 return image;
232 } 232 }
233 233
234 virtual GLHelper* GetGLHelper(ui::Compositor* compositor) { 234 virtual GLHelper* GetGLHelper(ui::Compositor* compositor) {
235 PerCompositorData* data = per_compositor_data_[compositor]; 235 PerCompositorData* data = per_compositor_data_[compositor];
236 if (!data) 236 if (!data)
237 data = CreatePerCompositorData(compositor); 237 data = CreatePerCompositorData(compositor);
238 if (!data->gl_helper.get()) { 238 if (!data->gl_helper.get()) {
239 WebKit::WebGraphicsContext3D* context_for_thread = 239 WebKit::WebGraphicsContext3D* context_for_thread =
240 CreateContextCommon(compositor, true); 240 CreateContextCommon(compositor, true);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 void ImageTransportFactory::Terminate() { 400 void ImageTransportFactory::Terminate() {
401 ui::ContextFactory::SetInstance(NULL); 401 ui::ContextFactory::SetInstance(NULL);
402 delete g_factory; 402 delete g_factory;
403 g_factory = NULL; 403 g_factory = NULL;
404 } 404 }
405 405
406 // static 406 // static
407 ImageTransportFactory* ImageTransportFactory::GetInstance() { 407 ImageTransportFactory* ImageTransportFactory::GetInstance() {
408 return g_factory; 408 return g_factory;
409 } 409 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/image_transport_factory.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698