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

Side by Side Diff: cc/test/fake_picture_layer_impl.cc

Issue 14772021: cc::OutputSurfaceClient::InitializeForGL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win compile by including ContextProvider from output_surface_client.h Created 7 years, 6 months 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/test/fake_picture_layer_impl.h ('k') | cc/test/test_web_graphics_context_3d.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/fake_picture_layer_impl.h" 5 #include "cc/test/fake_picture_layer_impl.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 FakePictureLayerImpl::FakePictureLayerImpl( 9 FakePictureLayerImpl::FakePictureLayerImpl(
10 LayerTreeImpl* tree_impl, 10 LayerTreeImpl* tree_impl,
11 int id, 11 int id,
12 scoped_refptr<PicturePileImpl> pile) 12 scoped_refptr<PicturePileImpl> pile)
13 : PictureLayerImpl(tree_impl, id) { 13 : PictureLayerImpl(tree_impl, id),
14 append_quads_count_(0) {
14 pile_ = pile; 15 pile_ = pile;
15 SetBounds(pile_->size()); 16 SetBounds(pile_->size());
16 CreateTilingSet(); 17 CreateTilingSet();
17 } 18 }
18 19
19 FakePictureLayerImpl::FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id) 20 FakePictureLayerImpl::FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id)
20 : PictureLayerImpl(tree_impl, id) {} 21 : PictureLayerImpl(tree_impl, id), append_quads_count_(0) {}
21 22
22 scoped_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl( 23 scoped_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl(
23 LayerTreeImpl* tree_impl) { 24 LayerTreeImpl* tree_impl) {
24 return make_scoped_ptr( 25 return make_scoped_ptr(
25 new FakePictureLayerImpl(tree_impl, id())).PassAs<LayerImpl>(); 26 new FakePictureLayerImpl(tree_impl, id())).PassAs<LayerImpl>();
26 } 27 }
27 28
29 void FakePictureLayerImpl::AppendQuads(QuadSink* quad_sink,
30 AppendQuadsData* append_quads_data) {
31 PictureLayerImpl::AppendQuads(quad_sink, append_quads_data);
32 ++append_quads_count_;
33 }
34
28 gfx::Size FakePictureLayerImpl::CalculateTileSize(gfx::Size content_bounds) { 35 gfx::Size FakePictureLayerImpl::CalculateTileSize(gfx::Size content_bounds) {
29 if (fixed_tile_size_.IsEmpty()) { 36 if (fixed_tile_size_.IsEmpty()) {
30 return PictureLayerImpl::CalculateTileSize(content_bounds); 37 return PictureLayerImpl::CalculateTileSize(content_bounds);
31 } 38 }
32 39
33 return fixed_tile_size_; 40 return fixed_tile_size_;
34 } 41 }
35 42
36 } // namespace cc 43 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_impl.h ('k') | cc/test/test_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698