| 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 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 CreateOutputSurface(); | 589 CreateOutputSurface(); |
| 590 } | 590 } |
| 591 | 591 |
| 592 void CompositorImpl::OnGpuChannelTimeout() { | 592 void CompositorImpl::OnGpuChannelTimeout() { |
| 593 LOG(FATAL) << "Timed out waiting for GPU channel."; | 593 LOG(FATAL) << "Timed out waiting for GPU channel."; |
| 594 } | 594 } |
| 595 | 595 |
| 596 void CompositorImpl::RequestNewOutputSurface() { | 596 void CompositorImpl::RequestNewOutputSurface() { |
| 597 output_surface_request_pending_ = true; | 597 output_surface_request_pending_ = true; |
| 598 | 598 |
| 599 #if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || defined(SYZYASAN) | 599 #if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || \ |
| 600 const int64 kGpuChannelTimeoutInSeconds = 30; | 600 defined(SYZYASAN) || defined(CYGPROFILE_INSTRUMENTATION) |
| 601 const int64 kGpuChannelTimeoutInSeconds = 40; |
| 601 #else | 602 #else |
| 602 const int64 kGpuChannelTimeoutInSeconds = 10; | 603 const int64 kGpuChannelTimeoutInSeconds = 10; |
| 603 #endif | 604 #endif |
| 604 | 605 |
| 605 BrowserGpuChannelHostFactory* factory = | 606 BrowserGpuChannelHostFactory* factory = |
| 606 BrowserGpuChannelHostFactory::instance(); | 607 BrowserGpuChannelHostFactory::instance(); |
| 607 if (!factory->GetGpuChannel() || factory->GetGpuChannel()->IsLost()) { | 608 if (!factory->GetGpuChannel() || factory->GetGpuChannel()->IsLost()) { |
| 608 factory->EstablishGpuChannel( | 609 factory->EstablishGpuChannel( |
| 609 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE, | 610 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE, |
| 610 base::Bind(&CompositorImpl::OnGpuChannelEstablished, | 611 base::Bind(&CompositorImpl::OnGpuChannelEstablished, |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 | 785 |
| 785 void CompositorImpl::SetNeedsAnimate() { | 786 void CompositorImpl::SetNeedsAnimate() { |
| 786 needs_animate_ = true; | 787 needs_animate_ = true; |
| 787 if (!host_) | 788 if (!host_) |
| 788 return; | 789 return; |
| 789 | 790 |
| 790 host_->SetNeedsAnimate(); | 791 host_->SetNeedsAnimate(); |
| 791 } | 792 } |
| 792 | 793 |
| 793 } // namespace content | 794 } // namespace content |
| OLD | NEW |