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

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

Issue 2956713003: Replaces VideoLayer with a SurfaceLayer in WebMediaPlayerImpl (Closed)
Patch Set: Fixes error in deconstructor. 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 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 DCHECK(!surface_layer_bridge_); 1447 DCHECK(!surface_layer_bridge_);
1448 LocalFrame* frame = GetDocument().GetFrame(); 1448 LocalFrame* frame = GetDocument().GetFrame();
1449 WebLayerTreeView* layer_tree_view = nullptr; 1449 WebLayerTreeView* layer_tree_view = nullptr;
1450 // TODO(xlai): Ensure OffscreenCanvas commit() is still functional when a 1450 // TODO(xlai): Ensure OffscreenCanvas commit() is still functional when a
1451 // frame-less HTML canvas's document is reparenting under another frame. 1451 // frame-less HTML canvas's document is reparenting under another frame.
1452 // See crbug.com/683172. 1452 // See crbug.com/683172.
1453 if (frame) { 1453 if (frame) {
1454 layer_tree_view = 1454 layer_tree_view =
1455 frame->GetPage()->GetChromeClient().GetWebLayerTreeView(frame); 1455 frame->GetPage()->GetChromeClient().GetWebLayerTreeView(frame);
1456 surface_layer_bridge_ = 1456 surface_layer_bridge_ =
1457 WTF::MakeUnique<CanvasSurfaceLayerBridge>(this, layer_tree_view); 1457 WTF::MakeUnique<::blink::SurfaceLayerBridge>(this, layer_tree_view);
1458 // Creates a placeholder layer first before Surface is created. 1458 // Creates a placeholder layer first before Surface is created.
1459 surface_layer_bridge_->CreateSolidColorLayer(); 1459 surface_layer_bridge_->CreateSolidColorLayer();
1460 } 1460 }
1461 } 1461 }
1462 1462
1463 void HTMLCanvasElement::OnWebLayerReplaced() { 1463 void HTMLCanvasElement::OnWebLayerReplaced() {
1464 SetNeedsCompositingUpdate(); 1464 SetNeedsCompositingUpdate();
1465 } 1465 }
1466 1466
1467 } // namespace blink 1467 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698