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

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: comment, clang-format 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 impl->SetExternalDrawConstraints(
80 gfx::Transform(), viewport, viewport, resourceless_software_draw);
79 EXPECT_EQ(viewport.ToString(), impl->DeviceViewport().ToString()); 81 EXPECT_EQ(viewport.ToString(), impl->DeviceViewport().ToString());
80 } 82 }
81 83
82 scoped_ptr<CopyOutputRequest> LayerTreePixelTest::CreateCopyOutputRequest() { 84 scoped_ptr<CopyOutputRequest> LayerTreePixelTest::CreateCopyOutputRequest() {
83 return CopyOutputRequest::CreateBitmapRequest( 85 return CopyOutputRequest::CreateBitmapRequest(
84 base::Bind(&LayerTreePixelTest::ReadbackResult, base::Unretained(this))); 86 base::Bind(&LayerTreePixelTest::ReadbackResult, base::Unretained(this)));
85 } 87 }
86 88
87 void LayerTreePixelTest::ReadbackResult(scoped_ptr<CopyOutputResult> result) { 89 void LayerTreePixelTest::ReadbackResult(scoped_ptr<CopyOutputResult> result) {
88 ASSERT_TRUE(result->HasBitmap()); 90 ASSERT_TRUE(result->HasBitmap());
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 357
356 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); 358 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point);
357 *release_callback = SingleReleaseCallback::Create( 359 *release_callback = SingleReleaseCallback::Create(
358 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, 360 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox,
359 base::Unretained(this), 361 base::Unretained(this),
360 base::Passed(&context), 362 base::Passed(&context),
361 texture_id)); 363 texture_id));
362 } 364 }
363 365
364 } // namespace cc 366 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698