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

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

Issue 14409006: cc: Changes to use GL API for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Add internalformat parameter to CreateImageCHROMIUM in fake_web_graphics_context_3d to fix clang bu… Created 7 years, 7 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
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/test/fake_tile_manager.cc » ('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 2012 The Chromium Authors. All rights reserved. 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 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_tiling_client.h" 5 #include "cc/test/fake_picture_layer_tiling_client.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 namespace cc { 9 namespace cc {
10 10
11 class FakeInfinitePicturePileImpl : public PicturePileImpl { 11 class FakeInfinitePicturePileImpl : public PicturePileImpl {
12 public: 12 public:
13 FakeInfinitePicturePileImpl() 13 FakeInfinitePicturePileImpl()
14 : PicturePileImpl(false) { 14 : PicturePileImpl(false) {
15 gfx::Size size(std::numeric_limits<int>::max(), 15 gfx::Size size(std::numeric_limits<int>::max(),
16 std::numeric_limits<int>::max()); 16 std::numeric_limits<int>::max());
17 Resize(size); 17 Resize(size);
18 recorded_region_ = Region(gfx::Rect(size)); 18 recorded_region_ = Region(gfx::Rect(size));
19 } 19 }
20 20
21 protected: 21 protected:
22 virtual ~FakeInfinitePicturePileImpl() {} 22 virtual ~FakeInfinitePicturePileImpl() {}
23 }; 23 };
24 24
25 FakePictureLayerTilingClient::FakePictureLayerTilingClient() 25 FakePictureLayerTilingClient::FakePictureLayerTilingClient()
26 : tile_manager_(TileManager::Create(&tile_manager_client_, 26 : tile_manager_(TileManager::Create(&tile_manager_client_,
27 NULL, 27 NULL,
28 1, 28 1,
29 false, 29 false,
30 &stats_instrumentation_)), 30 &stats_instrumentation_,
31 false)),
31 pile_(new FakeInfinitePicturePileImpl()), 32 pile_(new FakeInfinitePicturePileImpl()),
32 twin_tiling_(NULL), 33 twin_tiling_(NULL),
33 allow_create_tile_(true) {} 34 allow_create_tile_(true) {}
34 35
35 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { 36 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() {
36 } 37 }
37 38
38 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( 39 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile(
39 PictureLayerTiling*, 40 PictureLayerTiling*,
40 gfx::Rect rect) { 41 gfx::Rect rect) {
(...skipping 27 matching lines...) Expand all
68 return twin_tiling_; 69 return twin_tiling_;
69 } 70 }
70 71
71 bool FakePictureLayerTilingClient::TileHasText(Tile* tile) { 72 bool FakePictureLayerTilingClient::TileHasText(Tile* tile) {
72 if (text_rect_.IsEmpty()) 73 if (text_rect_.IsEmpty())
73 return false; 74 return false;
74 return tile->content_rect().Intersects(text_rect_); 75 return tile->content_rect().Intersects(text_rect_);
75 } 76 }
76 77
77 } // namespace cc 78 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/test/fake_tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698