| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "core/frame/LocalFrame.h" | 35 #include "core/frame/LocalFrame.h" |
| 36 #include "core/input/EventHandler.h" | 36 #include "core/input/EventHandler.h" |
| 37 #include "core/layout/LayoutView.h" | 37 #include "core/layout/LayoutView.h" |
| 38 #include "core/layout/compositing/PaintLayerCompositor.h" | 38 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 39 #include "core/page/AutoscrollController.h" | 39 #include "core/page/AutoscrollController.h" |
| 40 #include "core/page/Page.h" | 40 #include "core/page/Page.h" |
| 41 #include "core/paint/TransformRecorder.h" | 41 #include "core/paint/TransformRecorder.h" |
| 42 #include "platform/Logging.h" | 42 #include "platform/Logging.h" |
| 43 #include "platform/graphics/GraphicsContext.h" | 43 #include "platform/graphics/GraphicsContext.h" |
| 44 #include "platform/graphics/paint/ClipRecorder.h" | 44 #include "platform/graphics/paint/ClipRecorder.h" |
| 45 #include "platform/graphics/paint/CullRect.h" |
| 45 #include "platform/graphics/paint/DrawingRecorder.h" | 46 #include "platform/graphics/paint/DrawingRecorder.h" |
| 46 #include "platform/graphics/paint/SkPictureBuilder.h" | 47 #include "platform/graphics/paint/SkPictureBuilder.h" |
| 47 #include "platform/transforms/AffineTransform.h" | 48 #include "platform/transforms/AffineTransform.h" |
| 48 #include "public/web/WebInputEvent.h" | 49 #include "public/web/WebInputEvent.h" |
| 49 #include "web/WebInputEventConversion.h" | 50 #include "web/WebInputEventConversion.h" |
| 50 #include "wtf/CurrentTime.h" | 51 #include "wtf/CurrentTime.h" |
| 51 | 52 |
| 52 namespace blink { | 53 namespace blink { |
| 53 | 54 |
| 54 void PageWidgetDelegate::animate(Page& page, double monotonicFrameBeginTime) | 55 void PageWidgetDelegate::animate(Page& page, double monotonicFrameBeginTime) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 80 | 81 |
| 81 AffineTransform scale; | 82 AffineTransform scale; |
| 82 scale.scale(scaleFactor); | 83 scale.scale(scaleFactor); |
| 83 TransformRecorder scaleRecorder(paintContext, root, scale); | 84 TransformRecorder scaleRecorder(paintContext, root, scale); |
| 84 | 85 |
| 85 IntRect dirtyRect(rect); | 86 IntRect dirtyRect(rect); |
| 86 FrameView* view = root.view(); | 87 FrameView* view = root.view(); |
| 87 if (view) { | 88 if (view) { |
| 88 ClipRecorder clipRecorder(paintContext, root, DisplayItem::PageWidge
tDelegateClip, LayoutRect(dirtyRect)); | 89 ClipRecorder clipRecorder(paintContext, root, DisplayItem::PageWidge
tDelegateClip, LayoutRect(dirtyRect)); |
| 89 | 90 |
| 90 view->paint(&paintContext, globalPaintFlags, dirtyRect); | 91 view->paint(&paintContext, globalPaintFlags, CullRect(dirtyRect)); |
| 91 } else if (!DrawingRecorder::useCachedDrawingIfPossible(paintContext, ro
ot, DisplayItem::PageWidgetDelegateBackgroundFallback)) { | 92 } else if (!DrawingRecorder::useCachedDrawingIfPossible(paintContext, ro
ot, DisplayItem::PageWidgetDelegateBackgroundFallback)) { |
| 92 DrawingRecorder drawingRecorder(paintContext, root, DisplayItem::Pag
eWidgetDelegateBackgroundFallback, dirtyRect); | 93 DrawingRecorder drawingRecorder(paintContext, root, DisplayItem::Pag
eWidgetDelegateBackgroundFallback, dirtyRect); |
| 93 paintContext.fillRect(dirtyRect, Color::white); | 94 paintContext.fillRect(dirtyRect, Color::white); |
| 94 } | 95 } |
| 95 } | 96 } |
| 96 pictureBuilder.endRecording()->playback(canvas); | 97 pictureBuilder.endRecording()->playback(canvas); |
| 97 } | 98 } |
| 98 | 99 |
| 99 void PageWidgetDelegate::paint(Page& page, WebCanvas* canvas, | 100 void PageWidgetDelegate::paint(Page& page, WebCanvas* canvas, |
| 100 const WebRect& rect, LocalFrame& root) | 101 const WebRect& rect, LocalFrame& root) |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 WEBINPUT_EVENT_CASE(TouchMove) | 255 WEBINPUT_EVENT_CASE(TouchMove) |
| 255 WEBINPUT_EVENT_CASE(TouchEnd) | 256 WEBINPUT_EVENT_CASE(TouchEnd) |
| 256 WEBINPUT_EVENT_CASE(TouchCancel) | 257 WEBINPUT_EVENT_CASE(TouchCancel) |
| 257 default: | 258 default: |
| 258 ASSERT_NOT_REACHED(); | 259 ASSERT_NOT_REACHED(); |
| 259 return ""; | 260 return ""; |
| 260 } | 261 } |
| 261 } | 262 } |
| 262 | 263 |
| 263 } // namespace blink | 264 } // namespace blink |
| OLD | NEW |