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

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

Issue 12249002: Setting a custom background on a HiDPI display will result in the background only being applied to … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on top of latest trunk - only the AUTHORS files needed updating Created 7 years, 10 months 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 | « AUTHORS ('k') | no next file » | 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) 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/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 SkShader::kRepeat_TileMode, 767 SkShader::kRepeat_TileMode,
768 SkShader::kRepeat_TileMode)); 768 SkShader::kRepeat_TileMode));
769 paint.setShader(shader.get()); 769 paint.setShader(shader.get());
770 770
771 // Use kSrc_Mode to handle background_ transparency properly. 771 // Use kSrc_Mode to handle background_ transparency properly.
772 paint.setXfermodeMode(SkXfermode::kSrc_Mode); 772 paint.setXfermodeMode(SkXfermode::kSrc_Mode);
773 773
774 // Canvas could contain multiple update rects. Clip to given rect so that 774 // Canvas could contain multiple update rects. Clip to given rect so that
775 // we don't accidentally clear other update rects. 775 // we don't accidentally clear other update rects.
776 canvas->save(); 776 canvas->save();
777 canvas->scale(device_scale_factor_, device_scale_factor_);
777 canvas->clipRect(gfx::RectToSkRect(rect)); 778 canvas->clipRect(gfx::RectToSkRect(rect));
778 canvas->drawPaint(paint); 779 canvas->drawPaint(paint);
779 canvas->restore(); 780 canvas->restore();
780 } 781 }
781 782
782 // First see if this rect is a plugin that can paint itself faster. 783 // First see if this rect is a plugin that can paint itself faster.
783 TransportDIB* optimized_dib = NULL; 784 TransportDIB* optimized_dib = NULL;
784 gfx::Rect optimized_copy_rect, optimized_copy_location; 785 gfx::Rect optimized_copy_rect, optimized_copy_location;
785 float dib_scale_factor; 786 float dib_scale_factor;
786 webkit::ppapi::PluginInstance* optimized_instance = 787 webkit::ppapi::PluginInstance* optimized_instance =
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 bool RenderWidget::WillHandleGestureEvent( 2137 bool RenderWidget::WillHandleGestureEvent(
2137 const WebKit::WebGestureEvent& event) { 2138 const WebKit::WebGestureEvent& event) {
2138 return false; 2139 return false;
2139 } 2140 }
2140 2141
2141 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { 2142 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
2142 return true; 2143 return true;
2143 } 2144 }
2144 2145
2145 } // namespace content 2146 } // namespace content
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698