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 "android_webview/native/aw_contents.h" | 5 #include "android_webview/native/aw_contents.h" |
6 | 6 |
7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
8 #include <sys/system_properties.h> | 8 #include <sys/system_properties.h> |
9 | 9 |
10 #include "android_webview/browser/aw_browser_context.h" | 10 #include "android_webview/browser/aw_browser_context.h" |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 } | 547 } |
548 | 548 |
549 void AwContents::Destroy(JNIEnv* env, jobject obj) { | 549 void AwContents::Destroy(JNIEnv* env, jobject obj) { |
550 delete this; | 550 delete this; |
551 } | 551 } |
552 | 552 |
553 // static | 553 // static |
554 void SetAwDrawSWFunctionTable(JNIEnv* env, jclass, jint function_table) { | 554 void SetAwDrawSWFunctionTable(JNIEnv* env, jclass, jint function_table) { |
555 g_draw_sw_functions = | 555 g_draw_sw_functions = |
556 reinterpret_cast<AwDrawSWFunctionTable*>(function_table); | 556 reinterpret_cast<AwDrawSWFunctionTable*>(function_table); |
557 // TODO(leandrogracia): uncomment once the glue layer implements this method. | 557 g_is_skia_version_compatible = |
558 //g_is_skia_version_compatible = | 558 g_draw_sw_functions->is_skia_version_compatible(&SkGraphics::GetVersion); |
559 // g_draw_sw_functions->is_skia_version_compatible(&SkGraphics::GetVersion); | |
560 LOG_IF(WARNING, !g_is_skia_version_compatible) << | 559 LOG_IF(WARNING, !g_is_skia_version_compatible) << |
561 "Skia native versions are not compatible."; | 560 "Skia native versions are not compatible."; |
562 } | 561 } |
563 | 562 |
564 // static | 563 // static |
565 jint GetAwDrawGLFunction(JNIEnv* env, jclass) { | 564 jint GetAwDrawGLFunction(JNIEnv* env, jclass) { |
566 return reinterpret_cast<jint>(&DrawGLFunction); | 565 return reinterpret_cast<jint>(&DrawGLFunction); |
567 } | 566 } |
568 | 567 |
569 namespace { | 568 namespace { |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 if (!picture) { | 1094 if (!picture) { |
1096 render_view_host_ext_->CapturePictureSync(); | 1095 render_view_host_ext_->CapturePictureSync(); |
1097 picture = RendererPictureMap::GetInstance()->GetRendererPicture( | 1096 picture = RendererPictureMap::GetInstance()->GetRendererPicture( |
1098 web_contents_->GetRoutingID()); | 1097 web_contents_->GetRoutingID()); |
1099 } | 1098 } |
1100 | 1099 |
1101 return picture; | 1100 return picture; |
1102 } | 1101 } |
1103 | 1102 |
1104 } // namespace android_webview | 1103 } // namespace android_webview |
OLD | NEW |