Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: android_webview/browser/in_process_view_renderer.cc

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for realz Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/accelerators/accelerator_filter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/in_process_view_renderer.h" 5 #include "android_webview/browser/in_process_view_renderer.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "android_webview/browser/aw_gl_surface.h" 9 #include "android_webview/browser/aw_gl_surface.h"
10 #include "android_webview/browser/scoped_app_gl_state_restore.h" 10 #include "android_webview/browser/scoped_app_gl_state_restore.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 if (AndroidBitmap_unlockPixels(env, jbitmap.obj()) < 0) { 102 if (AndroidBitmap_unlockPixels(env, jbitmap.obj()) < 0) {
103 LOG(ERROR) << "Error unlocking java bitmap pixels."; 103 LOG(ERROR) << "Error unlocking java bitmap pixels.";
104 return false; 104 return false;
105 } 105 }
106 106
107 return succeeded; 107 return succeeded;
108 } 108 }
109 109
110 bool RenderPictureToCanvas(SkPicture* picture, SkCanvas* canvas) {
111 canvas->drawPicture(*picture);
112 return true;
113 }
114
115 class ScopedPixelAccess { 110 class ScopedPixelAccess {
116 public: 111 public:
117 ScopedPixelAccess(JNIEnv* env, jobject java_canvas) { 112 ScopedPixelAccess(JNIEnv* env, jobject java_canvas) {
118 AwDrawSWFunctionTable* sw_functions = 113 AwDrawSWFunctionTable* sw_functions =
119 BrowserViewRenderer::GetAwDrawSWFunctionTable(); 114 BrowserViewRenderer::GetAwDrawSWFunctionTable();
120 pixels_ = sw_functions ? 115 pixels_ = sw_functions ?
121 sw_functions->access_pixels(env, java_canvas) : NULL; 116 sw_functions->access_pixels(env, java_canvas) : NULL;
122 } 117 }
123 ~ScopedPixelAccess() { 118 ~ScopedPixelAccess() {
124 if (pixels_) 119 if (pixels_)
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 base::StringAppendF(&str, 988 base::StringAppendF(&str,
994 "surface width height: [%d %d] ", 989 "surface width height: [%d %d] ",
995 draw_info->width, 990 draw_info->width,
996 draw_info->height); 991 draw_info->height);
997 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer); 992 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer);
998 } 993 }
999 return str; 994 return str;
1000 } 995 }
1001 996
1002 } // namespace android_webview 997 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698