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/compositor_impl_android.h" | 5 #include "content/browser/renderer_host/compositor_impl_android.h" |
6 | 6 |
7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
8 #include <android/native_window_jni.h> | 8 #include <android/native_window_jni.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 defined(SYZYASAN) || defined(CYGPROFILE_INSTRUMENTATION) | 469 defined(SYZYASAN) || defined(CYGPROFILE_INSTRUMENTATION) |
470 const int64_t kGpuChannelTimeoutInSeconds = 40; | 470 const int64_t kGpuChannelTimeoutInSeconds = 40; |
471 #else | 471 #else |
472 const int64_t kGpuChannelTimeoutInSeconds = 10; | 472 const int64_t kGpuChannelTimeoutInSeconds = 10; |
473 #endif | 473 #endif |
474 | 474 |
475 BrowserGpuChannelHostFactory* factory = | 475 BrowserGpuChannelHostFactory* factory = |
476 BrowserGpuChannelHostFactory::instance(); | 476 BrowserGpuChannelHostFactory::instance(); |
477 if (!factory->GetGpuChannel() || factory->GetGpuChannel()->IsLost()) { | 477 if (!factory->GetGpuChannel() || factory->GetGpuChannel()->IsLost()) { |
478 factory->EstablishGpuChannel( | 478 factory->EstablishGpuChannel( |
479 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE, | 479 CAUSE_FOR_GPU_LAUNCH_DISPLAY_COMPOSITOR_CONTEXT, |
480 base::Bind(&CompositorImpl::OnGpuChannelEstablished, | 480 base::Bind(&CompositorImpl::OnGpuChannelEstablished, |
481 weak_factory_.GetWeakPtr())); | 481 weak_factory_.GetWeakPtr())); |
482 establish_gpu_channel_timeout_.Start( | 482 establish_gpu_channel_timeout_.Start( |
483 FROM_HERE, base::TimeDelta::FromSeconds(kGpuChannelTimeoutInSeconds), | 483 FROM_HERE, base::TimeDelta::FromSeconds(kGpuChannelTimeoutInSeconds), |
484 this, &CompositorImpl::OnGpuChannelTimeout); | 484 this, &CompositorImpl::OnGpuChannelTimeout); |
485 return; | 485 return; |
486 } | 486 } |
487 | 487 |
488 CreateOutputSurface(); | 488 CreateOutputSurface(); |
489 } | 489 } |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 void CompositorImpl::SetNeedsAnimate() { | 680 void CompositorImpl::SetNeedsAnimate() { |
681 needs_animate_ = true; | 681 needs_animate_ = true; |
682 if (!host_->visible()) | 682 if (!host_->visible()) |
683 return; | 683 return; |
684 | 684 |
685 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); | 685 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); |
686 host_->SetNeedsAnimate(); | 686 host_->SetNeedsAnimate(); |
687 } | 687 } |
688 | 688 |
689 } // namespace content | 689 } // namespace content |
OLD | NEW |