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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 void WebPluginContainerImpl::printPage(int pageNumber, 340 void WebPluginContainerImpl::printPage(int pageNumber,
341 GraphicsContext& gc, 341 GraphicsContext& gc,
342 const IntRect& printRect) { 342 const IntRect& printRect) {
343 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible( 343 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(
344 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin)) 344 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin))
345 return; 345 return;
346 346
347 LayoutObjectDrawingRecorder drawingRecorder( 347 LayoutObjectDrawingRecorder drawingRecorder(
348 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin, printRect); 348 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin, printRect);
349 gc.save(); 349 gc.save();
350
350 WebCanvas* canvas = gc.canvas(); 351 WebCanvas* canvas = gc.canvas();
351 m_webPlugin->printPage(pageNumber, canvas); 352 m_webPlugin->printPage(pageNumber, canvas);
352 gc.restore(); 353 gc.restore();
353 } 354 }
354 355
355 void WebPluginContainerImpl::printEnd() { 356 void WebPluginContainerImpl::printEnd() {
356 m_webPlugin->printEnd(); 357 m_webPlugin->printEnd();
357 } 358 }
358 359
359 void WebPluginContainerImpl::copy() { 360 void WebPluginContainerImpl::copy() {
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 // frame view. 973 // frame view.
973 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); 974 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect);
974 } 975 }
975 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 976 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
976 // Convert to the plugin position. 977 // Convert to the plugin position.
977 for (size_t i = 0; i < cutOutRects.size(); i++) 978 for (size_t i = 0; i < cutOutRects.size(); i++)
978 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 979 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
979 } 980 }
980 981
981 } // namespace blink 982 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/PageOverlayTest.cpp ('k') | third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698