Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package


// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.


#include "app/surface/transport_dib.h"
#include "base/scoped_ptr.h"
#include "gfx/size.h"

class RenderProcessHost;
class RenderWidgetHost;

namespace gfx {
class Rect;

// Represents a layer of YUV data owned by RenderWidgetHost and composited with
// the backing store.  VideoLayer is responsible for converting to RGB as
// needed.
class VideoLayer {
  virtual ~VideoLayer();

  RenderWidgetHost* render_widget_host() const { return render_widget_host_; }
  const gfx::Size& size() { return size_; }

  // Copy the incoming bitmap into this video layer. |bitmap| contains YUV
  // pixel data in YV12 format and must be the same dimensions as this video
  // layer. |bitmap_rect| specifies the absolute position and destination size
  // of the bitmap on the backing store.
  virtual void CopyTransportDIB(RenderProcessHost* process,
                                TransportDIB::Id bitmap,
                                const gfx::Rect& bitmap_rect) = 0;

  // Can only be constructed via subclasses.
  VideoLayer(RenderWidgetHost* widget, const gfx::Size& size);

  // The owner of this video layer.
  RenderWidgetHost* render_widget_host_;

  // The size of the video layer.
  gfx::Size size_;



Generated by  Doxygen 1.6.0   Back to index