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

Side by Side Diff: third_party/WebKit/Source/web/LinkHighlightImpl.cpp

Issue 1452353002: Turn off computation of the interest rect in cc in synchronized paint mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "public/platform/WebDisplayItemList.h" 46 #include "public/platform/WebDisplayItemList.h"
47 #include "public/platform/WebFloatAnimationCurve.h" 47 #include "public/platform/WebFloatAnimationCurve.h"
48 #include "public/platform/WebFloatPoint.h" 48 #include "public/platform/WebFloatPoint.h"
49 #include "public/platform/WebLayer.h" 49 #include "public/platform/WebLayer.h"
50 #include "public/platform/WebRect.h" 50 #include "public/platform/WebRect.h"
51 #include "public/platform/WebSize.h" 51 #include "public/platform/WebSize.h"
52 #include "public/web/WebKit.h" 52 #include "public/web/WebKit.h"
53 #include "third_party/skia/include/core/SkCanvas.h" 53 #include "third_party/skia/include/core/SkCanvas.h"
54 #include "third_party/skia/include/core/SkPictureRecorder.h" 54 #include "third_party/skia/include/core/SkPictureRecorder.h"
55 #include "third_party/skia/include/utils/SkMatrix44.h" 55 #include "third_party/skia/include/utils/SkMatrix44.h"
56 #include "ui/gfx/geometry/rect.h"
56 #include "web/WebLocalFrameImpl.h" 57 #include "web/WebLocalFrameImpl.h"
57 #include "web/WebSettingsImpl.h" 58 #include "web/WebSettingsImpl.h"
58 #include "web/WebViewImpl.h" 59 #include "web/WebViewImpl.h"
59 #include "wtf/CurrentTime.h" 60 #include "wtf/CurrentTime.h"
60 #include "wtf/Vector.h" 61 #include "wtf/Vector.h"
61 62
62 namespace blink { 63 namespace blink {
63 64
64 PassOwnPtr<LinkHighlightImpl> LinkHighlightImpl::create(Node* node, WebViewImpl* owningWebViewImpl) 65 PassOwnPtr<LinkHighlightImpl> LinkHighlightImpl::create(Node* node, WebViewImpl* owningWebViewImpl)
65 { 66 {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 if (pathHasChanged) { 254 if (pathHasChanged) {
254 m_path = newPath; 255 m_path = newPath;
255 m_contentLayer->layer()->setBounds(enclosingIntRect(boundingRect).size() ); 256 m_contentLayer->layer()->setBounds(enclosingIntRect(boundingRect).size() );
256 } 257 }
257 258
258 m_contentLayer->layer()->setPosition(boundingRect.location()); 259 m_contentLayer->layer()->setPosition(boundingRect.location());
259 260
260 return pathHasChanged; 261 return pathHasChanged;
261 } 262 }
262 263
264 gfx::Rect LinkHighlightImpl::paintableRegion()
265 {
266 return gfx::Rect(0, 0, contentLayer()->layer()->bounds().width, contentLayer ()->layer()->bounds().height);
267 }
268
263 void LinkHighlightImpl::paintContents(WebDisplayItemList* webDisplayItemList, co nst WebRect& webClipRect, WebContentLayerClient::PaintingControlSetting painting Control) 269 void LinkHighlightImpl::paintContents(WebDisplayItemList* webDisplayItemList, co nst WebRect& webClipRect, WebContentLayerClient::PaintingControlSetting painting Control)
264 { 270 {
265 if (!m_node || !m_node->layoutObject()) 271 if (!m_node || !m_node->layoutObject())
266 return; 272 return;
267 273
268 SkPictureRecorder recorder; 274 SkPictureRecorder recorder;
269 SkCanvas* canvas = recorder.beginRecording(webClipRect.width, webClipRect.he ight); 275 SkCanvas* canvas = recorder.beginRecording(webClipRect.width, webClipRect.he ight);
270 canvas->translate(-webClipRect.x, -webClipRect.y); 276 canvas->translate(-webClipRect.x, -webClipRect.y);
271 277
272 SkPaint paint; 278 SkPaint paint;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 { 385 {
380 return clipLayer(); 386 return clipLayer();
381 } 387 }
382 388
383 WebCompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const 389 WebCompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const
384 { 390 {
385 return m_compositorPlayer.get(); 391 return m_compositorPlayer.get();
386 } 392 }
387 393
388 } // namespace blink 394 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698