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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 2653933003: Make stream captures work on canvases that are not in the DOM. (Closed)
Patch Set: rebase Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 1392
1393 if (!drawingBuffer()->markContentsChanged() && m_markedCanvasDirty) { 1393 if (!drawingBuffer()->markContentsChanged() && m_markedCanvasDirty) {
1394 return; 1394 return;
1395 } 1395 }
1396 1396
1397 if (!canvas()) 1397 if (!canvas())
1398 return; 1398 return;
1399 1399
1400 LayoutBox* layoutBox = canvas()->layoutBox(); 1400 LayoutBox* layoutBox = canvas()->layoutBox();
1401 if (layoutBox && layoutBox->hasAcceleratedCompositing()) { 1401 if (layoutBox && layoutBox->hasAcceleratedCompositing()) {
1402 layoutBox->contentChanged(changeType);
1403 }
1404 if (!m_markedCanvasDirty) {
1402 m_markedCanvasDirty = true; 1405 m_markedCanvasDirty = true;
1403 canvas()->clearCopiedImage(); 1406 IntSize canvasSize = clampedCanvasSize();
1404 layoutBox->contentChanged(changeType); 1407 didDraw(SkIRect::MakeXYWH(0, 0, canvasSize.width(), canvasSize.height()));
Ken Russell (switch to Gerrit) 2017/02/14 01:31:38 This is going to be triggered all the time now, an
Justin Novosad 2017/02/14 18:36:25 This does not get called more than once per frame
1405 } else {
1406 if (!m_markedCanvasDirty) {
1407 m_markedCanvasDirty = true;
1408 canvas()->didDraw(
1409 FloatRect(FloatPoint(0, 0), FloatSize(clampedCanvasSize())));
1410 }
1411 } 1408 }
1412 } 1409 }
1413 1410
1414 void WebGLRenderingContextBase::onErrorMessage(const char* message, 1411 void WebGLRenderingContextBase::onErrorMessage(const char* message,
1415 int32_t id) { 1412 int32_t id) {
1416 if (m_synthesizedErrorsToConsole) 1413 if (m_synthesizedErrorsToConsole)
1417 printGLErrorToConsole(message); 1414 printGLErrorToConsole(message);
1418 InspectorInstrumentation::didFireWebGLErrorOrWarning(canvas(), message); 1415 InspectorInstrumentation::didFireWebGLErrorOrWarning(canvas(), message);
1419 } 1416 }
1420 1417
(...skipping 6380 matching lines...) Expand 10 before | Expand all | Expand 10 after
7801 7798
7802 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( 7799 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(
7803 HTMLCanvasElementOrOffscreenCanvas& result) const { 7800 HTMLCanvasElementOrOffscreenCanvas& result) const {
7804 if (canvas()) 7801 if (canvas())
7805 result.setHTMLCanvasElement(canvas()); 7802 result.setHTMLCanvasElement(canvas());
7806 else 7803 else
7807 result.setOffscreenCanvas(offscreenCanvas()); 7804 result.setOffscreenCanvas(offscreenCanvas());
7808 } 7805 }
7809 7806
7810 } // namespace blink 7807 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698