Index: cc/layers/surface_layer.cc |
diff --git a/cc/layers/surface_layer.cc b/cc/layers/surface_layer.cc |
index 385f158608fd06b6565a5dcf32de4281a464aa32..62ae92b8a57e58675474cbc874731cf5b4f6ce04 100644 |
--- a/cc/layers/surface_layer.cc |
+++ b/cc/layers/surface_layer.cc |
@@ -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_.id != 0 && Layer::DrawsContent(); |
piman
2014/06/11 23:48:59
nit: is it worth adding a SurfaceId::is_null()?
|
} |
void SurfaceLayer::PushPropertiesTo(LayerImpl* layer) { |