Commit 16a6af15 authored by jamesr@chromium.org's avatar jamesr@chromium.org

Use a struct for cc::Surface ids for more type safety

We currently represent surface ids as just an int, but may want to move
to a richer data structure in the future. Identifiers that are ints are also
pretty easy to confuse with other ints.

R=piman@chromium.org

Review URL: https://codereview.chromium.org/331533002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276923 0039d316-1c4b-4281-b951-d872f2087c98
parent 9289b4e9
include_rules = [
"-cc/surfaces", # cc shouldn't depend directly on the surface implementation
"+gpu/GLES2",
"+gpu/command_buffer/client/context_support.h",
"+gpu/command_buffer/client/gles2_interface.h",
......
......@@ -494,6 +494,7 @@
'surfaces/display_client.h',
'surfaces/surface.cc',
'surfaces/surface.h',
'surfaces/surface_id.h',
'surfaces/surface_aggregator.cc',
'surfaces/surface_aggregator.h',
'surfaces/surface_client.h',
......
......@@ -12,11 +12,12 @@ scoped_refptr<SurfaceLayer> SurfaceLayer::Create() {
return make_scoped_refptr(new SurfaceLayer);
}
SurfaceLayer::SurfaceLayer() : Layer(), surface_id_(0) {}
SurfaceLayer::SurfaceLayer() : Layer() {
}
SurfaceLayer::~SurfaceLayer() {}
void SurfaceLayer::SetSurfaceId(int surface_id) {
void SurfaceLayer::SetSurfaceId(SurfaceId surface_id) {
surface_id_ = surface_id;
SetNeedsPushProperties();
}
......@@ -26,7 +27,7 @@ scoped_ptr<LayerImpl> SurfaceLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
}
bool SurfaceLayer::DrawsContent() const {
return surface_id_ && Layer::DrawsContent();
return !surface_id_.is_null() && Layer::DrawsContent();
}
void SurfaceLayer::PushPropertiesTo(LayerImpl* layer) {
......
......@@ -7,6 +7,7 @@
#include "cc/base/cc_export.h"
#include "cc/layers/layer.h"
#include "cc/surfaces/surface_id.h"
namespace cc {
......@@ -16,7 +17,7 @@ class CC_EXPORT SurfaceLayer : public Layer {
public:
static scoped_refptr<SurfaceLayer> Create();
void SetSurfaceId(int surface_id);
void SetSurfaceId(SurfaceId surface_id);
// Layer overrides.
virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
......@@ -30,7 +31,7 @@ class CC_EXPORT SurfaceLayer : public Layer {
private:
virtual ~SurfaceLayer();
int surface_id_;
SurfaceId surface_id_;
DISALLOW_COPY_AND_ASSIGN(SurfaceLayer);
};
......
......@@ -11,7 +11,8 @@
namespace cc {
SurfaceLayerImpl::SurfaceLayerImpl(LayerTreeImpl* tree_impl, int id)
: LayerImpl(tree_impl, id), surface_id_(0) {}
: LayerImpl(tree_impl, id) {
}
SurfaceLayerImpl::~SurfaceLayerImpl() {}
......@@ -20,7 +21,7 @@ scoped_ptr<LayerImpl> SurfaceLayerImpl::CreateLayerImpl(
return SurfaceLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
}
void SurfaceLayerImpl::SetSurfaceId(int surface_id) {
void SurfaceLayerImpl::SetSurfaceId(SurfaceId surface_id) {
if (surface_id_ == surface_id)
return;
......@@ -42,7 +43,7 @@ void SurfaceLayerImpl::AppendQuads(QuadSink* quad_sink,
AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data);
if (!surface_id_)
if (surface_id_.is_null())
return;
scoped_ptr<SurfaceDrawQuad> quad = SurfaceDrawQuad::Create();
......@@ -63,7 +64,7 @@ void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color,
void SurfaceLayerImpl::AsValueInto(base::DictionaryValue* dict) const {
LayerImpl::AsValueInto(dict);
dict->SetInteger("surface_id", surface_id_);
dict->SetInteger("surface_id", surface_id_.id);
}
const char* SurfaceLayerImpl::LayerTypeAsString() const {
......
......@@ -8,6 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "cc/base/cc_export.h"
#include "cc/layers/layer_impl.h"
#include "cc/surfaces/surface_id.h"
namespace cc {
......@@ -18,7 +19,7 @@ class CC_EXPORT SurfaceLayerImpl : public LayerImpl {
}
virtual ~SurfaceLayerImpl();
void SetSurfaceId(int surface_id);
void SetSurfaceId(SurfaceId surface_id);
// LayerImpl overrides.
virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
......@@ -36,7 +37,7 @@ class CC_EXPORT SurfaceLayerImpl : public LayerImpl {
virtual void AsValueInto(base::DictionaryValue* dict) const OVERRIDE;
virtual const char* LayerTypeAsString() const OVERRIDE;
int surface_id_;
SurfaceId surface_id_;
DISALLOW_COPY_AND_ASSIGN(SurfaceLayerImpl);
};
......
......@@ -21,7 +21,8 @@ TEST(SurfaceLayerImplTest, Occlusion) {
surface_layer_impl->SetBounds(layer_size);
surface_layer_impl->SetContentBounds(layer_size);
surface_layer_impl->SetDrawsContent(true);
surface_layer_impl->SetSurfaceId(9);
SurfaceId surface_id(9);
surface_layer_impl->SetSurfaceId(surface_id);
impl.CalcDrawProps(viewport_size);
......
......@@ -490,7 +490,7 @@ TEST(DrawQuadTest, CopyStreamVideoDrawQuad) {
TEST(DrawQuadTest, CopySurfaceDrawQuad) {
gfx::Rect visible_rect(40, 50, 30, 20);
int surface_id = 1234;
SurfaceId surface_id(1234);
CREATE_SHARED_STATE();
CREATE_QUAD_2_NEW(SurfaceDrawQuad, visible_rect, surface_id);
......@@ -798,7 +798,7 @@ TEST_F(DrawQuadIteratorTest, StreamVideoDrawQuad) {
TEST_F(DrawQuadIteratorTest, SurfaceDrawQuad) {
gfx::Rect visible_rect(40, 50, 30, 20);
int surface_id = 4321;
SurfaceId surface_id(4321);
CREATE_SHARED_STATE();
CREATE_QUAD_2_NEW(SurfaceDrawQuad, visible_rect, surface_id);
......
......@@ -9,7 +9,8 @@
namespace cc {
SurfaceDrawQuad::SurfaceDrawQuad() : surface_id(0) {}
SurfaceDrawQuad::SurfaceDrawQuad() {
}
scoped_ptr<SurfaceDrawQuad> SurfaceDrawQuad::Create() {
return make_scoped_ptr(new SurfaceDrawQuad);
......@@ -18,7 +19,7 @@ scoped_ptr<SurfaceDrawQuad> SurfaceDrawQuad::Create() {
void SurfaceDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
const gfx::Rect& rect,
const gfx::Rect& visible_rect,
int surface_id) {
SurfaceId surface_id) {
gfx::Rect opaque_rect;
bool needs_blending = false;
DrawQuad::SetAll(shared_quad_state, DrawQuad::SURFACE_CONTENT, rect,
......@@ -31,7 +32,7 @@ void SurfaceDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
const gfx::Rect& opaque_rect,
const gfx::Rect& visible_rect,
bool needs_blending,
int surface_id) {
SurfaceId surface_id) {
DrawQuad::SetAll(shared_quad_state, DrawQuad::SURFACE_CONTENT, rect,
opaque_rect, visible_rect, needs_blending);
this->surface_id = surface_id;
......@@ -46,7 +47,7 @@ const SurfaceDrawQuad* SurfaceDrawQuad::MaterialCast(const DrawQuad* quad) {
}
void SurfaceDrawQuad::ExtendValue(base::DictionaryValue* value) const {
value->SetInteger("surface_id", surface_id);
value->SetInteger("surface_id", surface_id.id);
}
......
......@@ -8,6 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "cc/base/cc_export.h"
#include "cc/quads/draw_quad.h"
#include "cc/surfaces/surface_id.h"
namespace cc {
......@@ -18,16 +19,16 @@ class CC_EXPORT SurfaceDrawQuad : public DrawQuad {
void SetNew(const SharedQuadState* shared_quad_state,
const gfx::Rect& rect,
const gfx::Rect& visible_rect,
int surface_id);
SurfaceId surface_id);
void SetAll(const SharedQuadState* shared_quad_state,
const gfx::Rect& rect,
const gfx::Rect& opaque_rect,
const gfx::Rect& visible_rect,
bool needs_blending,
int surface_id);
SurfaceId surface_id);
int surface_id;
SurfaceId surface_id;
virtual void IterateResources(const ResourceIteratorCallback& callback)
OVERRIDE;
......
......@@ -153,8 +153,8 @@ bool Display::Draw() {
return true;
}
int Display::CurrentSurfaceID() {
return current_surface_ ? current_surface_->surface_id() : 0;
SurfaceId Display::CurrentSurfaceId() {
return current_surface_ ? current_surface_->surface_id() : SurfaceId();
}
void Display::ReturnResources(const ReturnedResourceArray& resources) {
......
......@@ -11,6 +11,7 @@
#include "cc/output/renderer.h"
#include "cc/surfaces/surface_aggregator.h"
#include "cc/surfaces/surface_client.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surfaces_export.h"
namespace gfx {
......@@ -39,7 +40,7 @@ class CC_SURFACES_EXPORT Display : public SurfaceClient,
void Resize(const gfx::Size& new_size);
bool Draw();
int CurrentSurfaceID();
SurfaceId CurrentSurfaceId();
// OutputSurfaceClient implementation.
virtual void DeferredInitialize() OVERRIDE {}
......
......@@ -15,7 +15,7 @@ Surface::Surface(SurfaceManager* manager,
: manager_(manager),
client_(client),
size_(size) {
surface_id_ = manager_->RegisterAndAllocateIDForSurface(this);
surface_id_ = manager_->RegisterAndAllocateIdForSurface(this);
}
Surface::~Surface() {
......
......@@ -7,6 +7,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surfaces_export.h"
#include "ui/gfx/size.h"
......@@ -23,7 +24,7 @@ class CC_SURFACES_EXPORT Surface {
~Surface();
const gfx::Size& size() const { return size_; }
int surface_id() const { return surface_id_; }
SurfaceId surface_id() const { return surface_id_; }
void QueueFrame(scoped_ptr<CompositorFrame> frame);
// Returns the most recent frame that is eligible to be rendered.
......@@ -33,7 +34,7 @@ class CC_SURFACES_EXPORT Surface {
SurfaceManager* manager_;
SurfaceClient* client_;
gfx::Size size_;
int surface_id_;
SurfaceId surface_id_;
// TODO(jamesr): Support multiple frames in flight.
scoped_ptr<CompositorFrame> current_frame_;
......
......@@ -24,9 +24,9 @@ SurfaceAggregator::SurfaceAggregator(SurfaceManager* manager)
SurfaceAggregator::~SurfaceAggregator() {}
DelegatedFrameData* SurfaceAggregator::GetReferencedDataForSurfaceID(
int surface_id) {
Surface* referenced_surface = manager_->GetSurfaceForID(surface_id);
DelegatedFrameData* SurfaceAggregator::GetReferencedDataForSurfaceId(
SurfaceId surface_id) {
Surface* referenced_surface = manager_->GetSurfaceForId(surface_id);
if (!referenced_surface)
return NULL; // Invalid surface id, skip this quad.
CompositorFrame* referenced_frame = referenced_surface->GetEligibleFrame();
......@@ -74,16 +74,16 @@ RenderPass::Id SurfaceAggregator::RemapPassId(
void SurfaceAggregator::HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
RenderPass* dest_pass) {
int surface_id = surface_quad->surface_id;
SurfaceId surface_id = surface_quad->surface_id;
// If this surface's id is already in our referenced set then it creates
// a cycle in the graph and should be dropped.
if (referenced_surfaces_.count(surface_id))
if (referenced_surfaces_.count(surface_id.id))
return;
DelegatedFrameData* referenced_data =
GetReferencedDataForSurfaceID(surface_id);
GetReferencedDataForSurfaceId(surface_id);
if (!referenced_data)
return;
std::set<int>::iterator it = referenced_surfaces_.insert(surface_id).first;
std::set<int>::iterator it = referenced_surfaces_.insert(surface_id.id).first;
const RenderPassList& referenced_passes = referenced_data->render_pass_list;
for (size_t j = 0; j + 1 < referenced_passes.size(); ++j) {
......@@ -91,7 +91,7 @@ void SurfaceAggregator::HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
scoped_ptr<RenderPass> copy_pass(RenderPass::Create());
RenderPass::Id remapped_pass_id = RemapPassId(source.id, surface_id);
RenderPass::Id remapped_pass_id = RemapPassId(source.id, surface_id.id);
copy_pass->SetAll(remapped_pass_id,
source.output_rect,
......@@ -111,7 +111,7 @@ void SurfaceAggregator::HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
source.shared_quad_state_list,
gfx::Transform(),
copy_pass.get(),
surface_id);
surface_id.id);
dest_pass_list_->push_back(copy_pass.Pass());
}
......@@ -125,7 +125,7 @@ void SurfaceAggregator::HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
last_pass.shared_quad_state_list,
surface_quad->quadTransform(),
dest_pass,
surface_id);
surface_id.id);
referenced_surfaces_.erase(it);
}
......@@ -215,8 +215,8 @@ void SurfaceAggregator::CopyPasses(const RenderPassList& source_pass_list,
}
}
scoped_ptr<CompositorFrame> SurfaceAggregator::Aggregate(int surface_id) {
Surface* surface = manager_->GetSurfaceForID(surface_id);
scoped_ptr<CompositorFrame> SurfaceAggregator::Aggregate(SurfaceId surface_id) {
Surface* surface = manager_->GetSurfaceForId(surface_id);
if (!surface)
return scoped_ptr<CompositorFrame>();
CompositorFrame* root_surface_frame = surface->GetEligibleFrame();
......@@ -231,10 +231,10 @@ scoped_ptr<CompositorFrame> SurfaceAggregator::Aggregate(int surface_id) {
const RenderPassList& source_pass_list =
root_surface_frame->delegated_frame_data->render_pass_list;
std::set<int>::iterator it = referenced_surfaces_.insert(surface_id).first;
std::set<int>::iterator it = referenced_surfaces_.insert(surface_id.id).first;
dest_pass_list_ = &frame->delegated_frame_data->render_pass_list;
CopyPasses(source_pass_list, surface_id);
CopyPasses(source_pass_list, surface_id.id);
referenced_surfaces_.erase(it);
DCHECK(referenced_surfaces_.empty());
......
......@@ -10,6 +10,7 @@
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/scoped_ptr.h"
#include "cc/quads/render_pass.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surfaces_export.h"
namespace cc {
......@@ -24,10 +25,10 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
explicit SurfaceAggregator(SurfaceManager* manager);
~SurfaceAggregator();
scoped_ptr<CompositorFrame> Aggregate(int surface_id);
scoped_ptr<CompositorFrame> Aggregate(SurfaceId surface_id);
private:
DelegatedFrameData* GetReferencedDataForSurfaceID(int surface_id);
DelegatedFrameData* GetReferencedDataForSurfaceId(SurfaceId surface_id);
RenderPass::Id RemapPassId(RenderPass::Id surface_local_pass_id,
int surface_id);
......
......@@ -24,7 +24,7 @@ namespace test {
void AddTestSurfaceQuad(TestRenderPass* pass,
const gfx::Size& surface_size,
int surface_id) {
SurfaceId surface_id) {
gfx::Transform content_to_target_transform;
gfx::Size content_bounds = surface_size;
gfx::Rect visible_content_rect = gfx::Rect(surface_size);
......
......@@ -7,6 +7,7 @@
#include "cc/quads/draw_quad.h"
#include "cc/quads/render_pass.h"
#include "cc/surfaces/surface_id.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/size.h"
......@@ -25,7 +26,7 @@ struct Quad {
return quad;
}
static Quad SurfaceQuad(int surface_id) {
static Quad SurfaceQuad(SurfaceId surface_id) {
Quad quad;
quad.material = DrawQuad::SURFACE_CONTENT;
quad.surface_id = surface_id;
......@@ -41,7 +42,7 @@ struct Quad {
DrawQuad::Material material;
// Set when material==DrawQuad::SURFACE_CONTENT.
int surface_id;
SurfaceId surface_id;
// Set when material==DrawQuad::SOLID_COLOR.
SkColor color;
// Set when material==DrawQuad::RENDER_PASS.
......@@ -50,7 +51,6 @@ struct Quad {
private:
Quad()
: material(DrawQuad::INVALID),
surface_id(-1),
color(SK_ColorWHITE),
render_pass_id(-1, -1) {}
};
......
......@@ -19,7 +19,12 @@
namespace cc {
namespace {
const int kInvalidSurfaceId = -1;
SurfaceId InvalidSurfaceId() {
static SurfaceId invalid;
invalid.id = -1;
return invalid;
}
class SurfaceAggregatorTest : public testing::Test {
public:
......@@ -31,7 +36,7 @@ class SurfaceAggregatorTest : public testing::Test {
};
TEST_F(SurfaceAggregatorTest, InvalidSurfaceId) {
scoped_ptr<CompositorFrame> frame = aggregator_.Aggregate(kInvalidSurfaceId);
scoped_ptr<CompositorFrame> frame = aggregator_.Aggregate(InvalidSurfaceId());
EXPECT_FALSE(frame);
}
......@@ -258,7 +263,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, MultiPassSurfaceReference) {
// be dropped.
TEST_F(SurfaceAggregatorValidSurfaceTest, InvalidSurfaceReference) {
test::Quad quads[] = {test::Quad::SolidColorQuad(SK_ColorGREEN),
test::Quad::SurfaceQuad(kInvalidSurfaceId),
test::Quad::SurfaceQuad(InvalidSurfaceId()),
test::Quad::SolidColorQuad(SK_ColorBLUE)};
test::Pass passes[] = {test::Pass(quads, arraysize(quads))};
......
// Copyright 2014 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.
#ifndef CC_SURFACES_SURFACE_ID_H_
#define CC_SURFACES_SURFACE_ID_H_
namespace cc {
struct SurfaceId {
SurfaceId() : id(0) {}
explicit SurfaceId(int id) : id(id) {}
bool is_null() const { return id == 0; }
int id;
};
inline bool operator==(const SurfaceId& a, const SurfaceId& b) {
return a.id == b.id;
}
inline bool operator!=(const SurfaceId& a, const SurfaceId& b) {
return !(a == b);
}
} // namespace cc
#endif // CC_SURFACES_SURFACE_ID_H_
......@@ -14,21 +14,21 @@ SurfaceManager::SurfaceManager()
SurfaceManager::~SurfaceManager() {}
int SurfaceManager::RegisterAndAllocateIDForSurface(Surface* surface) {
SurfaceId SurfaceManager::RegisterAndAllocateIdForSurface(Surface* surface) {
DCHECK(surface);
int surface_id = next_surface_id_++;
surface_map_[surface_id] = surface;
return surface_id;
return SurfaceId(surface_id);
}
void SurfaceManager::DeregisterSurface(int surface_id) {
SurfaceMap::iterator it = surface_map_.find(surface_id);
void SurfaceManager::DeregisterSurface(SurfaceId surface_id) {
SurfaceMap::iterator it = surface_map_.find(surface_id.id);
DCHECK(it != surface_map_.end());
surface_map_.erase(it);
}
Surface* SurfaceManager::GetSurfaceForID(int surface_id) {
SurfaceMap::iterator it = surface_map_.find(surface_id);
Surface* SurfaceManager::GetSurfaceForId(SurfaceId surface_id) {
SurfaceMap::iterator it = surface_map_.find(surface_id.id);
if (it == surface_map_.end())
return NULL;
return it->second;
......
......@@ -7,23 +7,23 @@
#include "base/containers/hash_tables.h"
#include "base/macros.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surfaces_export.h"
namespace gfx { class Size; }
namespace cc {
class CompositorFrame;
class Surface;
class SurfaceClient;
class CC_SURFACES_EXPORT SurfaceManager {
public:
SurfaceManager();
~SurfaceManager();
int RegisterAndAllocateIDForSurface(Surface* surface);
void DeregisterSurface(int surface_id);
SurfaceId RegisterAndAllocateIdForSurface(Surface* surface);
void DeregisterSurface(SurfaceId surface_id);
Surface* GetSurfaceForID(int surface_id);
Surface* GetSurfaceForId(SurfaceId surface_id);
private:
typedef base::hash_map<int, Surface*> SurfaceMap;
......
......@@ -13,15 +13,15 @@ namespace {
TEST(SurfaceTest, SurfaceLifetime) {
SurfaceManager manager;
int surface_id = 0;
SurfaceId surface_id;
{
Surface surface(&manager, NULL, gfx::Size(5, 5));
surface_id = surface.surface_id();
EXPECT_GT(surface_id, 0);
EXPECT_EQ(&surface, manager.GetSurfaceForID(surface_id));
EXPECT_TRUE(!surface_id.is_null());
EXPECT_EQ(&surface, manager.GetSurfaceForId(surface_id));
}
EXPECT_EQ(NULL, manager.GetSurfaceForID(surface_id));
EXPECT_EQ(NULL, manager.GetSurfaceForId(surface_id));
}
} // namespace
......
......@@ -30,8 +30,8 @@ void SurfaceDisplayOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
gfx::Size frame_size =
frame->delegated_frame_data->render_pass_list.back()->output_rect.size();
display_->Resize(frame_size);
int surface_id = display_->CurrentSurfaceID();
cc::Surface* surface = surface_manager_->GetSurfaceForID(surface_id);
cc::SurfaceId surface_id = display_->CurrentSurfaceId();
cc::Surface* surface = surface_manager_->GetSurfaceForId(surface_id);
if (!surface)
return;
......
......@@ -25,6 +25,7 @@
#include "cc/resources/resource_format.h"
#include "cc/resources/returned_resource.h"
#include "cc/resources/transferable_resource.h"
#include "cc/surfaces/surface_id.h"
#include "content/common/content_export.h"
#include "gpu/ipc/gpu_command_buffer_traits.h"
#include "ipc/ipc_message_macros.h"
......@@ -139,6 +140,10 @@ IPC_STRUCT_TRAITS_BEGIN(cc::RenderPass::Id)
IPC_STRUCT_TRAITS_MEMBER(index)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(cc::SurfaceId)
IPC_STRUCT_TRAITS_MEMBER(id)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(cc::DrawQuad)
IPC_STRUCT_TRAITS_MEMBER(material)
IPC_STRUCT_TRAITS_MEMBER(rect)
......
......@@ -403,7 +403,7 @@ TEST_F(CCMessagesTest, AllQuads) {
scoped_ptr<DrawQuad> streamvideo_cmp = streamvideo_in->Copy(
streamvideo_in->shared_quad_state);
int arbitrary_surface_id = 3;
cc::SurfaceId arbitrary_surface_id(3);
scoped_ptr<SurfaceDrawQuad> surface_in = SurfaceDrawQuad::Create();
surface_in->SetAll(shared_state3_in,
arbitrary_rect2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment