Fix a type mismatch on Windows caused by r201738.
[chromium-blink-merge.git] / cc / test / fake_content_layer.cc
blob384521c9b81afb0dc9c9be5b1ba7c7d84dbd819b
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "cc/test/fake_content_layer.h"
7 #include "cc/resources/prioritized_resource.h"
8 #include "cc/test/fake_content_layer_impl.h"
10 namespace cc {
12 FakeContentLayer::FakeContentLayer(ContentLayerClient* client)
13 : ContentLayer(client),
14 update_count_(0) {
15 SetAnchorPoint(gfx::PointF(0.f, 0.f));
16 SetBounds(gfx::Size(1, 1));
17 SetIsDrawable(true);
20 FakeContentLayer::~FakeContentLayer() {}
22 scoped_ptr<LayerImpl> FakeContentLayer::CreateLayerImpl(
23 LayerTreeImpl* tree_impl) {
24 return FakeContentLayerImpl::Create(tree_impl, layer_id_).PassAs<LayerImpl>();
27 void FakeContentLayer::Update(ResourceUpdateQueue* queue,
28 const OcclusionTracker* occlusion,
29 RenderingStats* stats) {
30 ContentLayer::Update(queue, occlusion, stats);
31 update_count_++;
34 bool FakeContentLayer::HaveBackingAt(int i, int j) {
35 const PrioritizedResource* resource = ResourceAtForTesting(i, j);
36 return resource && resource->have_backing_texture();
39 } // namespace cc