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

Side by Side Diff: ui/surface/accelerated_surface_transformer_win_unittest.cc

Issue 12090109: Tab Capture: Backing store readbacks to YV12 VideoFrames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style fix per wjia Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/surface/accelerated_surface_transformer_win.cc ('k') | ui/surface/accelerated_surface_win.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <d3d9.h> 5 #include <d3d9.h>
6 #include <random> 6 #include <random>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/hash.h" 10 #include "base/hash.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 base::win::ScopedComPtr<IDirect3DSurface9> src, dst; 348 base::win::ScopedComPtr<IDirect3DSurface9> src, dst;
349 ASSERT_TRUE(d3d_utils::CreateTemporaryLockableSurface( 349 ASSERT_TRUE(d3d_utils::CreateTemporaryLockableSurface(
350 device(), src_size, src.Receive())) 350 device(), src_size, src.Receive()))
351 << "Could not create src render target"; 351 << "Could not create src render target";
352 ASSERT_TRUE(d3d_utils::CreateTemporaryLockableSurface( 352 ASSERT_TRUE(d3d_utils::CreateTemporaryLockableSurface(
353 device(), dst_size, dst.Receive())) 353 device(), dst_size, dst.Receive()))
354 << "Could not create dst render target"; 354 << "Could not create dst render target";
355 355
356 FillSymmetricRandomCheckerboard(src, src_size, checkerboard_size); 356 FillSymmetricRandomCheckerboard(src, src_size, checkerboard_size);
357 357
358 ASSERT_TRUE(gpu_ops->ResizeBilinear(src, gfx::Rect(src_size), dst)); 358 ASSERT_TRUE(gpu_ops->ResizeBilinear(src, gfx::Rect(src_size), dst,
359 gfx::Rect(dst_size)));
359 360
360 AssertSymmetry(dst, dst_size); 361 AssertSymmetry(dst, dst_size);
361 } 362 }
362 363
363 void CreateRandomCheckerboardTexture( 364 void CreateRandomCheckerboardTexture(
364 const gfx::Size& size, 365 const gfx::Size& size,
365 int checkerboard_size, 366 int checkerboard_size,
366 IDirect3DSurface9** reference_surface, 367 IDirect3DSurface9** reference_surface,
367 IDirect3DTexture9** result) { 368 IDirect3DTexture9** result) {
368 base::win::ScopedComPtr<IDirect3DSurface9> dst; 369 base::win::ScopedComPtr<IDirect3DSurface9> dst;
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 result.push_back(base::win::GetVersion()); 882 result.push_back(base::win::GetVersion());
882 } 883 }
883 return result; 884 return result;
884 } 885 }
885 886
886 } // namespace 887 } // namespace
887 888
888 INSTANTIATE_TEST_CASE_P(VistaAndUp, 889 INSTANTIATE_TEST_CASE_P(VistaAndUp,
889 AcceleratedSurfaceTransformerTest, 890 AcceleratedSurfaceTransformerTest,
890 ::testing::ValuesIn(WindowsVersionIfVistaOrBetter())); 891 ::testing::ValuesIn(WindowsVersionIfVistaOrBetter()));
OLDNEW
« no previous file with comments | « ui/surface/accelerated_surface_transformer_win.cc ('k') | ui/surface/accelerated_surface_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698