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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2956713003: Replaces VideoLayer with a SurfaceLayer in WebMediaPlayerImpl (Closed)
Patch Set: Addresses comments #56-58. Created 3 years, 5 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) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 DCHECK(!surface_layer_bridge_); 1448 DCHECK(!surface_layer_bridge_);
1449 LocalFrame* frame = GetDocument().GetFrame(); 1449 LocalFrame* frame = GetDocument().GetFrame();
1450 WebLayerTreeView* layer_tree_view = nullptr; 1450 WebLayerTreeView* layer_tree_view = nullptr;
1451 // TODO(xlai): Ensure OffscreenCanvas commit() is still functional when a 1451 // TODO(xlai): Ensure OffscreenCanvas commit() is still functional when a
1452 // frame-less HTML canvas's document is reparenting under another frame. 1452 // frame-less HTML canvas's document is reparenting under another frame.
1453 // See crbug.com/683172. 1453 // See crbug.com/683172.
1454 if (frame) { 1454 if (frame) {
1455 layer_tree_view = 1455 layer_tree_view =
1456 frame->GetPage()->GetChromeClient().GetWebLayerTreeView(frame); 1456 frame->GetPage()->GetChromeClient().GetWebLayerTreeView(frame);
1457 surface_layer_bridge_ = 1457 surface_layer_bridge_ =
1458 WTF::MakeUnique<CanvasSurfaceLayerBridge>(this, layer_tree_view); 1458 WTF::MakeUnique<::blink::SurfaceLayerBridge>(this, layer_tree_view);
1459 // Creates a placeholder layer first before Surface is created. 1459 // Creates a placeholder layer first before Surface is created.
1460 surface_layer_bridge_->CreateSolidColorLayer(); 1460 surface_layer_bridge_->CreateSolidColorLayer();
1461 } 1461 }
1462 } 1462 }
1463 1463
1464 void HTMLCanvasElement::OnWebLayerReplaced() { 1464 void HTMLCanvasElement::OnWebLayerReplaced() {
1465 SetNeedsCompositingUpdate(); 1465 SetNeedsCompositingUpdate();
1466 } 1466 }
1467 1467
1468 } // namespace blink 1468 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698