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

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

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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/test/layer_tree_pixel_test.h ('k') | cc/test/pixel_test.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 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 void LayerTreePixelTest::SetupTree() { 222 void LayerTreePixelTest::SetupTree() {
223 scoped_refptr<Layer> root = Layer::Create(); 223 scoped_refptr<Layer> root = Layer::Create();
224 root->SetBounds(content_root_->bounds()); 224 root->SetBounds(content_root_->bounds());
225 root->AddChild(content_root_); 225 root->AddChild(content_root_);
226 layer_tree_host()->SetRootLayer(root); 226 layer_tree_host()->SetRootLayer(root);
227 LayerTreeTest::SetupTree(); 227 LayerTreeTest::SetupTree();
228 } 228 }
229 229
230 scoped_ptr<SkBitmap> LayerTreePixelTest::CopyTextureMailboxToBitmap( 230 scoped_ptr<SkBitmap> LayerTreePixelTest::CopyTextureMailboxToBitmap(
231 gfx::Size size, 231 const gfx::Size& size,
232 const TextureMailbox& texture_mailbox) { 232 const TextureMailbox& texture_mailbox) {
233 DCHECK(texture_mailbox.IsTexture()); 233 DCHECK(texture_mailbox.IsTexture());
234 if (!texture_mailbox.IsTexture()) 234 if (!texture_mailbox.IsTexture())
235 return scoped_ptr<SkBitmap>(); 235 return scoped_ptr<SkBitmap>();
236 236
237 scoped_ptr<gpu::GLInProcessContext> context = CreateTestInProcessContext(); 237 scoped_ptr<gpu::GLInProcessContext> context = CreateTestInProcessContext();
238 GLES2Interface* gl = context->GetImplementation(); 238 GLES2Interface* gl = context->GetImplementation();
239 239
240 if (texture_mailbox.sync_point()) 240 if (texture_mailbox.sync_point())
241 gl->WaitSyncPointCHROMIUM(texture_mailbox.sync_point()); 241 gl->WaitSyncPointCHROMIUM(texture_mailbox.sync_point());
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 371
372 *texture_mailbox = TextureMailbox(mailbox, sync_point); 372 *texture_mailbox = TextureMailbox(mailbox, sync_point);
373 *release_callback = SingleReleaseCallback::Create( 373 *release_callback = SingleReleaseCallback::Create(
374 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, 374 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox,
375 base::Unretained(this), 375 base::Unretained(this),
376 base::Passed(&context), 376 base::Passed(&context),
377 texture_id)); 377 texture_id));
378 } 378 }
379 379
380 } // namespace cc 380 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_pixel_test.h ('k') | cc/test/pixel_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698