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

Side by Side Diff: cc/video_layer_impl.cc

Issue 11529003: [cc] Route LayerImpl::layerTreeHostImpl() calls through LayerTreeImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/tiled_layer_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/video_layer_impl.h" 5 #include "cc/video_layer_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/io_surface_draw_quad.h" 8 #include "cc/io_surface_draw_quad.h"
9 #include "cc/layer_tree_host_impl.h" 9 #include "cc/layer_tree_impl.h"
10 #include "cc/math_util.h" 10 #include "cc/math_util.h"
11 #include "cc/quad_sink.h" 11 #include "cc/quad_sink.h"
12 #include "cc/renderer.h"
12 #include "cc/resource_provider.h" 13 #include "cc/resource_provider.h"
13 #include "cc/stream_video_draw_quad.h" 14 #include "cc/stream_video_draw_quad.h"
14 #include "cc/texture_draw_quad.h" 15 #include "cc/texture_draw_quad.h"
15 #include "cc/yuv_video_draw_quad.h" 16 #include "cc/yuv_video_draw_quad.h"
16 #include "media/filters/skcanvas_video_renderer.h" 17 #include "media/filters/skcanvas_video_renderer.h"
17 #include "third_party/khronos/GLES2/gl2.h" 18 #include "third_party/khronos/GLES2/gl2.h"
18 #include "third_party/khronos/GLES2/gl2ext.h" 19 #include "third_party/khronos/GLES2/gl2ext.h"
19 20
20 namespace cc { 21 namespace cc {
21 22
(...skipping 22 matching lines...) Expand all
44 m_provider->setVideoFrameProviderClient(this); 45 m_provider->setVideoFrameProviderClient(this);
45 } 46 }
46 47
47 VideoLayerImpl::~VideoLayerImpl() 48 VideoLayerImpl::~VideoLayerImpl()
48 { 49 {
49 // See comment in constructor for why this doesn't need a lock. 50 // See comment in constructor for why this doesn't need a lock.
50 if (m_provider) { 51 if (m_provider) {
51 m_provider->setVideoFrameProviderClient(0); 52 m_provider->setVideoFrameProviderClient(0);
52 m_provider = 0; 53 m_provider = 0;
53 } 54 }
54 freePlaneData(layerTreeHostImpl()->resourceProvider()); 55 freePlaneData(layerTreeImpl()->resource_provider());
55 56
56 #ifndef NDEBUG 57 #ifndef NDEBUG
57 for (size_t i = 0; i < media::VideoFrame::kMaxPlanes; ++i) 58 for (size_t i = 0; i < media::VideoFrame::kMaxPlanes; ++i)
58 DCHECK(!m_framePlanes[i].resourceId); 59 DCHECK(!m_framePlanes[i].resourceId);
59 DCHECK(!m_externalTextureResource); 60 DCHECK(!m_externalTextureResource);
60 #endif 61 #endif
61 } 62 }
62 63
63 void VideoLayerImpl::stopUsingProvider() 64 void VideoLayerImpl::stopUsingProvider()
64 { 65 {
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 m_streamTextureMatrix = MathUtil::createGfxTransform( 406 m_streamTextureMatrix = MathUtil::createGfxTransform(
406 matrix[0], matrix[1], matrix[2], matrix[3], 407 matrix[0], matrix[1], matrix[2], matrix[3],
407 matrix[4], matrix[5], matrix[6], matrix[7], 408 matrix[4], matrix[5], matrix[6], matrix[7],
408 matrix[8], matrix[9], matrix[10], matrix[11], 409 matrix[8], matrix[9], matrix[10], matrix[11],
409 matrix[12], matrix[13], matrix[14], matrix[15]); 410 matrix[12], matrix[13], matrix[14], matrix[15]);
410 setNeedsRedraw(); 411 setNeedsRedraw();
411 } 412 }
412 413
413 void VideoLayerImpl::didLoseOutputSurface() 414 void VideoLayerImpl::didLoseOutputSurface()
414 { 415 {
415 freePlaneData(layerTreeHostImpl()->resourceProvider()); 416 freePlaneData(layerTreeImpl()->resource_provider());
416 } 417 }
417 418
418 void VideoLayerImpl::setNeedsRedraw() 419 void VideoLayerImpl::setNeedsRedraw()
419 { 420 {
420 layerTreeHostImpl()->setNeedsRedraw(); 421 layerTreeImpl()->SetNeedsRedraw();
421 } 422 }
422 423
423 const char* VideoLayerImpl::layerTypeAsString() const 424 const char* VideoLayerImpl::layerTypeAsString() const
424 { 425 {
425 return "VideoLayer"; 426 return "VideoLayer";
426 } 427 }
427 428
428 } // namespace cc 429 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiled_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698