| 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 if (host_) | 498 if (host_) |
| 499 host_->set_has_transparent_background(flag); | 499 host_->set_has_transparent_background(flag); |
| 500 } | 500 } |
| 501 | 501 |
| 502 void CompositorImpl::SetNeedsComposite() { | 502 void CompositorImpl::SetNeedsComposite() { |
| 503 if (!host_.get()) | 503 if (!host_.get()) |
| 504 return; | 504 return; |
| 505 DCHECK(!needs_composite_ || WillComposite()); | 505 DCHECK(!needs_composite_ || WillComposite()); |
| 506 | 506 |
| 507 needs_composite_ = true; | 507 needs_composite_ = true; |
| 508 PostComposite(COMPOSITE_EVENTUALLY); | 508 PostComposite(COMPOSITE_IMMEDIATELY); |
| 509 } | 509 } |
| 510 | 510 |
| 511 cc::UIResourceId CompositorImpl::GenerateUIResourceFromUIResourceBitmap( | 511 cc::UIResourceId CompositorImpl::GenerateUIResourceFromUIResourceBitmap( |
| 512 const cc::UIResourceBitmap& bitmap, | 512 const cc::UIResourceBitmap& bitmap, |
| 513 bool is_transient) { | 513 bool is_transient) { |
| 514 if (!host_) | 514 if (!host_) |
| 515 return 0; | 515 return 0; |
| 516 | 516 |
| 517 cc::UIResourceId id = 0; | 517 cc::UIResourceId id = 0; |
| 518 scoped_ptr<cc::UIResourceClient> resource; | 518 scoped_ptr<cc::UIResourceClient> resource; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 } | 718 } |
| 719 | 719 |
| 720 void CompositorImpl::SetNeedsAnimate() { | 720 void CompositorImpl::SetNeedsAnimate() { |
| 721 if (!host_) | 721 if (!host_) |
| 722 return; | 722 return; |
| 723 | 723 |
| 724 host_->SetNeedsAnimate(); | 724 host_->SetNeedsAnimate(); |
| 725 } | 725 } |
| 726 | 726 |
| 727 } // namespace content | 727 } // namespace content |
| OLD | NEW |