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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 13726: Move Image operations and convolver to the skia namespace and clean up a few ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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 | « chrome/common/gfx/icon_util.cc ('k') | chrome/views/button.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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 score->good_clipping = true; 791 score->good_clipping = true;
792 } 792 }
793 } 793 }
794 794
795 score->at_top = (frame->ScrollOffset().height() == 0); 795 score->at_top = (frame->ScrollOffset().height() == 0);
796 796
797 SkBitmap subset; 797 SkBitmap subset;
798 device->accessBitmap(false).extractSubset(&subset, src_rect); 798 device->accessBitmap(false).extractSubset(&subset, src_rect);
799 799
800 // Resample the subset that we want to get it the right size. 800 // Resample the subset that we want to get it the right size.
801 *thumbnail = gfx::ImageOperations::Resize( 801 *thumbnail = skia::ImageOperations::Resize(
802 subset, gfx::ImageOperations::RESIZE_LANCZOS3, gfx::Size(w, h)); 802 subset, skia::ImageOperations::RESIZE_LANCZOS3, w, h);
803 803
804 score->boring_score = CalculateBoringScore(thumbnail); 804 score->boring_score = CalculateBoringScore(thumbnail);
805 805
806 #ifdef TIME_BITMAP_RETRIEVAL 806 #ifdef TIME_BITMAP_RETRIEVAL
807 double end = time_util::GetHighResolutionTimeNow(); 807 double end = time_util::GetHighResolutionTimeNow();
808 char buf[128]; 808 char buf[128];
809 sprintf_s(buf, "thumbnail in %gms\n", (end - begin) * 1000); 809 sprintf_s(buf, "thumbnail in %gms\n", (end - begin) * 1000);
810 OutputDebugStringA(buf); 810 OutputDebugStringA(buf);
811 #endif 811 #endif
812 return true; 812 return true;
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2739 template_resource_id)); 2739 template_resource_id));
2740 2740
2741 if (template_html.empty()) { 2741 if (template_html.empty()) {
2742 NOTREACHED() << "unable to load template. ID: " << template_resource_id; 2742 NOTREACHED() << "unable to load template. ID: " << template_resource_id;
2743 return ""; 2743 return "";
2744 } 2744 }
2745 // "t" is the id of the templates root node. 2745 // "t" is the id of the templates root node.
2746 return jstemplate_builder::GetTemplateHtml( 2746 return jstemplate_builder::GetTemplateHtml(
2747 template_html, &error_strings, "t"); 2747 template_html, &error_strings, "t");
2748 } 2748 }
OLDNEW
« no previous file with comments | « chrome/common/gfx/icon_util.cc ('k') | chrome/views/button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698