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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |