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

Side by Side Diff: cc/layers/tiled_layer_unittest.cc

Issue 256573003: cc: Remove the capability to give up and leave compositing mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « no previous file | cc/test/fake_layer_tree_host_client.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layers/tiled_layer.h" 5 #include "cc/layers/tiled_layer.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 bool EnsureOutputSurfaceCreated() { 62 bool EnsureOutputSurfaceCreated() {
63 base::MessageLoop::current()->PostDelayedTask( 63 base::MessageLoop::current()->PostDelayedTask(
64 FROM_HERE, 64 FROM_HERE,
65 run_loop_.QuitClosure(), 65 run_loop_.QuitClosure(),
66 base::TimeDelta::FromSeconds(5)); 66 base::TimeDelta::FromSeconds(5));
67 run_loop_.Run(); 67 run_loop_.Run();
68 return output_surface_created_; 68 return output_surface_created_;
69 } 69 }
70 70
71 virtual CreateResult OnCreateAndInitializeOutputSurfaceAttempted( 71 virtual void OnCreateAndInitializeOutputSurfaceAttempted(
72 bool success) OVERRIDE { 72 bool success) OVERRIDE {
73 CreateResult result = 73 LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(success);
74 LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(success);
75 output_surface_created_ = success; 74 output_surface_created_ = success;
76 run_loop_.Quit(); 75 run_loop_.Quit();
77 return result;
78 } 76 }
79 77
80 private: 78 private:
81 SynchronousOutputSurfaceLayerTreeHost( 79 SynchronousOutputSurfaceLayerTreeHost(
82 LayerTreeHostClient* client, 80 LayerTreeHostClient* client,
83 SharedBitmapManager* manager, 81 SharedBitmapManager* manager,
84 const LayerTreeSettings& settings, 82 const LayerTreeSettings& settings,
85 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) 83 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner)
86 : LayerTreeHost(client, manager, settings), 84 : LayerTreeHost(client, manager, settings),
87 output_surface_created_(false) { 85 output_surface_created_(false) {
(...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 // Invalidate the entire layer in layer space. When painting, the rect given 1814 // Invalidate the entire layer in layer space. When painting, the rect given
1817 // to webkit should match the layer's bounds. 1815 // to webkit should match the layer's bounds.
1818 layer->SetNeedsDisplayRect(layer_rect); 1816 layer->SetNeedsDisplayRect(layer_rect);
1819 layer->Update(queue_.get(), NULL); 1817 layer->Update(queue_.get(), NULL);
1820 1818
1821 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); 1819 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect());
1822 } 1820 }
1823 1821
1824 } // namespace 1822 } // namespace
1825 } // namespace cc 1823 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/test/fake_layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698