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

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

Issue 590313004: Revert of Fix bad scaling in TiledLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/skpicture_content_layer_updater.cc ('k') | cc/test/tiled_layer_test_common.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 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_content_layer.h" 5 #include "cc/test/fake_content_layer.h"
6 6
7 #include "cc/resources/content_layer_updater.h" 7 #include "cc/resources/content_layer_updater.h"
8 #include "cc/resources/prioritized_resource.h" 8 #include "cc/resources/prioritized_resource.h"
9 #include "cc/test/fake_content_layer_impl.h" 9 #include "cc/test/fake_content_layer_impl.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 class FakeContentLayerUpdater : public ContentLayerUpdater { 13 class FakeContentLayerUpdater : public ContentLayerUpdater {
14 public: 14 public:
15 using ContentLayerUpdater::paint_rect; 15 using ContentLayerUpdater::content_rect;
16 16
17 private: 17 private:
18 virtual ~FakeContentLayerUpdater() {} 18 virtual ~FakeContentLayerUpdater() {}
19 }; 19 };
20 20
21 FakeContentLayer::FakeContentLayer(ContentLayerClient* client) 21 FakeContentLayer::FakeContentLayer(ContentLayerClient* client)
22 : ContentLayer(client), 22 : ContentLayer(client),
23 update_count_(0), 23 update_count_(0),
24 push_properties_count_(0), 24 push_properties_count_(0),
25 output_surface_created_count_(0), 25 output_surface_created_count_(0),
(...skipping 10 matching lines...) Expand all
36 } 36 }
37 37
38 bool FakeContentLayer::Update(ResourceUpdateQueue* queue, 38 bool FakeContentLayer::Update(ResourceUpdateQueue* queue,
39 const OcclusionTracker<Layer>* occlusion) { 39 const OcclusionTracker<Layer>* occlusion) {
40 bool updated = ContentLayer::Update(queue, occlusion); 40 bool updated = ContentLayer::Update(queue, occlusion);
41 update_count_++; 41 update_count_++;
42 return updated || always_update_resources_; 42 return updated || always_update_resources_;
43 } 43 }
44 44
45 gfx::Rect FakeContentLayer::LastPaintRect() const { 45 gfx::Rect FakeContentLayer::LastPaintRect() const {
46 return (static_cast<FakeContentLayerUpdater*>(Updater()))->paint_rect(); 46 return (static_cast<FakeContentLayerUpdater*>
47 (Updater()))->content_rect();
47 } 48 }
48 49
49 void FakeContentLayer::PushPropertiesTo(LayerImpl* layer) { 50 void FakeContentLayer::PushPropertiesTo(LayerImpl* layer) {
50 ContentLayer::PushPropertiesTo(layer); 51 ContentLayer::PushPropertiesTo(layer);
51 push_properties_count_++; 52 push_properties_count_++;
52 } 53 }
53 54
54 void FakeContentLayer::OnOutputSurfaceCreated() { 55 void FakeContentLayer::OnOutputSurfaceCreated() {
55 ContentLayer::OnOutputSurfaceCreated(); 56 ContentLayer::OnOutputSurfaceCreated();
56 output_surface_created_count_++; 57 output_surface_created_count_++;
57 } 58 }
58 59
59 bool FakeContentLayer::HaveBackingAt(int i, int j) { 60 bool FakeContentLayer::HaveBackingAt(int i, int j) {
60 const PrioritizedResource* resource = ResourceAtForTesting(i, j); 61 const PrioritizedResource* resource = ResourceAtForTesting(i, j);
61 return resource && resource->have_backing_texture(); 62 return resource && resource->have_backing_texture();
62 } 63 }
63 64
64 } // namespace cc 65 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/skpicture_content_layer_updater.cc ('k') | cc/test/tiled_layer_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698