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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
OLDNEW
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/renderer/browser_plugin/browser_plugin.h" 5 #include "content/renderer/browser_plugin/browser_plugin.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #if defined (OS_WIN) 9 #if defined (OS_WIN)
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 const WebVector<WebRect>& cut_outs_rects, 686 const WebVector<WebRect>& cut_outs_rects,
687 bool is_visible) { 687 bool is_visible) {
688 int old_width = width(); 688 int old_width = width();
689 int old_height = height(); 689 int old_height = height();
690 plugin_rect_ = window_rect; 690 plugin_rect_ = window_rect;
691 if (old_width == window_rect.width && 691 if (old_width == window_rect.width &&
692 old_height == window_rect.height) { 692 old_height == window_rect.height) {
693 return; 693 return;
694 } 694 }
695 695
696 const size_t stride = skia::PlatformCanvas::StrideForWidth(window_rect.width); 696 const size_t stride = skia::PlatformCanvasStrideForWidth(window_rect.width);
697 // Make sure the size of the damage buffer is at least four bytes so that we 697 // Make sure the size of the damage buffer is at least four bytes so that we
698 // can fit in a magic word to verify that the memory is shared correctly. 698 // can fit in a magic word to verify that the memory is shared correctly.
699 size_t size = 699 size_t size =
700 std::max(sizeof(unsigned int), 700 std::max(sizeof(unsigned int),
701 static_cast<size_t>(window_rect.height * 701 static_cast<size_t>(window_rect.height *
702 stride * 702 stride *
703 GetDeviceScaleFactor() * 703 GetDeviceScaleFactor() *
704 GetDeviceScaleFactor())); 704 GetDeviceScaleFactor()));
705 705
706 // Don't drop the old damage buffer until after we've made sure that the 706 // Don't drop the old damage buffer until after we've made sure that the
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 void* notify_data) { 890 void* notify_data) {
891 } 891 }
892 892
893 void BrowserPlugin::didFailLoadingFrameRequest( 893 void BrowserPlugin::didFailLoadingFrameRequest(
894 const WebKit::WebURL& url, 894 const WebKit::WebURL& url,
895 void* notify_data, 895 void* notify_data,
896 const WebKit::WebURLError& error) { 896 const WebKit::WebURLError& error) {
897 } 897 }
898 898
899 } // namespace content 899 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698