| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/android/compositor/compositor_view.h" | 5 #include "chrome/browser/android/compositor/compositor_view.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 <memory> | 10 #include <memory> |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // This should not happen. Setting red background just for debugging. | 228 // This should not happen. Setting red background just for debugging. |
| 229 SetBackground(true, SK_ColorRED); | 229 SetBackground(true, SK_ColorRED); |
| 230 #else | 230 #else |
| 231 SetBackground(true, SK_ColorBLACK); | 231 SetBackground(true, SK_ColorBLACK); |
| 232 #endif | 232 #endif |
| 233 } | 233 } |
| 234 } | 234 } |
| 235 | 235 |
| 236 void CompositorView::FinalizeLayers(JNIEnv* env, | 236 void CompositorView::FinalizeLayers(JNIEnv* env, |
| 237 const JavaParamRef<jobject>& jobj) { | 237 const JavaParamRef<jobject>& jobj) { |
| 238 UNSHIPPED_TRACE_EVENT0("compositor", "CompositorView::FinalizeLayers"); | 238 #if !defined(OFFICIAL_BUILD) |
| 239 TRACE_EVENT0("compositor", "CompositorView::FinalizeLayers"); |
| 240 #endif |
| 239 } | 241 } |
| 240 | 242 |
| 241 void CompositorView::SetNeedsComposite(JNIEnv* env, | 243 void CompositorView::SetNeedsComposite(JNIEnv* env, |
| 242 const JavaParamRef<jobject>& object) { | 244 const JavaParamRef<jobject>& object) { |
| 243 compositor_->SetNeedsComposite(); | 245 compositor_->SetNeedsComposite(); |
| 244 } | 246 } |
| 245 | 247 |
| 246 void CompositorView::BrowserChildProcessHostDisconnected( | 248 void CompositorView::BrowserChildProcessHostDisconnected( |
| 247 const content::ChildProcessData& data) { | 249 const content::ChildProcessData& data) { |
| 248 LOG(WARNING) << "Child process disconnected (type=" << data.process_type | 250 LOG(WARNING) << "Child process disconnected (type=" << data.process_type |
| (...skipping 14 matching lines...) Expand all Loading... |
| 263 // The Android TERMINATION_STATUS_OOM_PROTECTED hack causes us to never go | 265 // The Android TERMINATION_STATUS_OOM_PROTECTED hack causes us to never go |
| 264 // through here but through BrowserChildProcessHostDisconnected() instead. | 266 // through here but through BrowserChildProcessHostDisconnected() instead. |
| 265 } | 267 } |
| 266 | 268 |
| 267 // Register native methods | 269 // Register native methods |
| 268 bool RegisterCompositorView(JNIEnv* env) { | 270 bool RegisterCompositorView(JNIEnv* env) { |
| 269 return RegisterNativesImpl(env); | 271 return RegisterNativesImpl(env); |
| 270 } | 272 } |
| 271 | 273 |
| 272 } // namespace android | 274 } // namespace android |
| OLD | NEW |