OLD | NEW |
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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 } | 393 } |
394 | 394 |
395 WebGraphicsContext3DCommandBufferImpl* CreateContextCommon( | 395 WebGraphicsContext3DCommandBufferImpl* CreateContextCommon( |
396 const base::WeakPtr<WebGraphicsContext3DSwapBuffersClient>& swap_client, | 396 const base::WeakPtr<WebGraphicsContext3DSwapBuffersClient>& swap_client, |
397 int surface_id) { | 397 int surface_id) { |
398 WebKit::WebGraphicsContext3D::Attributes attrs; | 398 WebKit::WebGraphicsContext3D::Attributes attrs; |
399 attrs.shareResources = true; | 399 attrs.shareResources = true; |
400 attrs.depth = false; | 400 attrs.depth = false; |
401 attrs.stencil = false; | 401 attrs.stencil = false; |
402 attrs.antialias = false; | 402 attrs.antialias = false; |
| 403 attrs.noAutomaticFlushes = true; |
403 GpuChannelHostFactory* factory = BrowserGpuChannelHostFactory::instance(); | 404 GpuChannelHostFactory* factory = BrowserGpuChannelHostFactory::instance(); |
404 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); | 405 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); |
405 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 406 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
406 new WebGraphicsContext3DCommandBufferImpl( | 407 new WebGraphicsContext3DCommandBufferImpl( |
407 surface_id, | 408 surface_id, |
408 url, | 409 url, |
409 factory, | 410 factory, |
410 swap_client)); | 411 swap_client)); |
411 if (!context->Initialize( | 412 if (!context->Initialize( |
412 attrs, | 413 attrs, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 void ImageTransportFactory::Terminate() { | 491 void ImageTransportFactory::Terminate() { |
491 ui::ContextFactory::SetInstance(NULL); | 492 ui::ContextFactory::SetInstance(NULL); |
492 delete g_factory; | 493 delete g_factory; |
493 g_factory = NULL; | 494 g_factory = NULL; |
494 } | 495 } |
495 | 496 |
496 // static | 497 // static |
497 ImageTransportFactory* ImageTransportFactory::GetInstance() { | 498 ImageTransportFactory* ImageTransportFactory::GetInstance() { |
498 return g_factory; | 499 return g_factory; |
499 } | 500 } |
OLD | NEW |