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

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

Issue 376683004: Pass resourceless software mode in BeginFrameArgs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tiny clean up Created 6 years, 5 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
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/layer_tree_pixel_test.h" 5 #include "cc/test/layer_tree_pixel_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "cc/base/switches.h" 9 #include "cc/base/switches.h"
10 #include "cc/layers/solid_color_layer.h" 10 #include "cc/layers/solid_color_layer.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 LayerTreeImpl* commit_tree = 68 LayerTreeImpl* commit_tree =
69 impl->pending_tree() ? impl->pending_tree() : impl->active_tree(); 69 impl->pending_tree() ? impl->pending_tree() : impl->active_tree();
70 if (commit_tree->source_frame_number() != 0) 70 if (commit_tree->source_frame_number() != 0)
71 return; 71 return;
72 72
73 gfx::Rect viewport = impl->DeviceViewport(); 73 gfx::Rect viewport = impl->DeviceViewport();
74 // The viewport has a 0,0 origin without external influence. 74 // The viewport has a 0,0 origin without external influence.
75 EXPECT_EQ(gfx::Point().ToString(), viewport.origin().ToString()); 75 EXPECT_EQ(gfx::Point().ToString(), viewport.origin().ToString());
76 // Be that influence! 76 // Be that influence!
77 viewport += gfx::Vector2d(20, 10); 77 viewport += gfx::Vector2d(20, 10);
78 impl->SetExternalDrawConstraints(gfx::Transform(), viewport, viewport, true); 78 bool resourceless_software_draw = false;
79 bool valid_for_tile_management = true;
80 impl->SetExternalDrawConstraints(gfx::Transform(),
81 viewport,
82 viewport,
83 resourceless_software_draw,
84 valid_for_tile_management);
79 EXPECT_EQ(viewport.ToString(), impl->DeviceViewport().ToString()); 85 EXPECT_EQ(viewport.ToString(), impl->DeviceViewport().ToString());
80 } 86 }
81 87
82 scoped_ptr<CopyOutputRequest> LayerTreePixelTest::CreateCopyOutputRequest() { 88 scoped_ptr<CopyOutputRequest> LayerTreePixelTest::CreateCopyOutputRequest() {
83 return CopyOutputRequest::CreateBitmapRequest( 89 return CopyOutputRequest::CreateBitmapRequest(
84 base::Bind(&LayerTreePixelTest::ReadbackResult, base::Unretained(this))); 90 base::Bind(&LayerTreePixelTest::ReadbackResult, base::Unretained(this)));
85 } 91 }
86 92
87 void LayerTreePixelTest::ReadbackResult(scoped_ptr<CopyOutputResult> result) { 93 void LayerTreePixelTest::ReadbackResult(scoped_ptr<CopyOutputResult> result) {
88 ASSERT_TRUE(result->HasBitmap()); 94 ASSERT_TRUE(result->HasBitmap());
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 361
356 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); 362 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point);
357 *release_callback = SingleReleaseCallback::Create( 363 *release_callback = SingleReleaseCallback::Create(
358 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, 364 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox,
359 base::Unretained(this), 365 base::Unretained(this),
360 base::Passed(&context), 366 base::Passed(&context),
361 texture_id)); 367 texture_id));
362 } 368 }
363 369
364 } // namespace cc 370 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698