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

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

Issue 2463103002: Revert of Fix HTML5 video blurry (Closed)
Patch Set: Created 4 years, 1 month 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/data/yuv_stripes_rgba.png ('k') | cc/test/test_in_process_context_provider.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/render_pass_test_utils.h" 5 #include "cc/test/render_pass_test_utils.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "cc/quads/debug_border_draw_quad.h" 10 #include "cc/quads/debug_border_draw_quad.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 ResourceId resource7 = resource_provider->CreateResource( 177 ResourceId resource7 = resource_provider->CreateResource(
178 gfx::Size(9, 14), ResourceProvider::TEXTURE_HINT_IMMUTABLE, 178 gfx::Size(9, 14), ResourceProvider::TEXTURE_HINT_IMMUTABLE,
179 resource_provider->best_texture_format(), gfx::ColorSpace()); 179 resource_provider->best_texture_format(), gfx::ColorSpace());
180 resource_provider->AllocateForTesting(resource7); 180 resource_provider->AllocateForTesting(resource7);
181 181
182 unsigned target = GL_TEXTURE_2D; 182 unsigned target = GL_TEXTURE_2D;
183 gpu::Mailbox gpu_mailbox; 183 gpu::Mailbox gpu_mailbox;
184 memcpy(gpu_mailbox.name, "Hello world", strlen("Hello world") + 1); 184 memcpy(gpu_mailbox.name, "Hello world", strlen("Hello world") + 1);
185 std::unique_ptr<SingleReleaseCallbackImpl> callback = 185 std::unique_ptr<SingleReleaseCallbackImpl> callback =
186 SingleReleaseCallbackImpl::Create(base::Bind(&EmptyReleaseCallback)); 186 SingleReleaseCallbackImpl::Create(base::Bind(&EmptyReleaseCallback));
187 TextureMailbox mailbox(gpu_mailbox, kSyncTokenForMailboxTextureQuad, target, 187 TextureMailbox mailbox(gpu_mailbox, kSyncTokenForMailboxTextureQuad, target);
188 rect.size(), false, false);
189 ResourceId resource8 = resource_provider->CreateResourceFromTextureMailbox( 188 ResourceId resource8 = resource_provider->CreateResourceFromTextureMailbox(
190 mailbox, std::move(callback)); 189 mailbox, std::move(callback));
191 resource_provider->AllocateForTesting(resource8); 190 resource_provider->AllocateForTesting(resource8);
192 191
193 SharedQuadState* shared_state = to_pass->CreateAndAppendSharedQuadState(); 192 SharedQuadState* shared_state = to_pass->CreateAndAppendSharedQuadState();
194 shared_state->SetAll(gfx::Transform(), rect.size(), rect, rect, false, 1, 193 shared_state->SetAll(gfx::Transform(), rect.size(), rect, rect, false, 1,
195 SkXfermode::kSrcOver_Mode, 0); 194 SkXfermode::kSrcOver_Mode, 0);
196 195
197 DebugBorderDrawQuad* debug_border_quad = 196 DebugBorderDrawQuad* debug_border_quad =
198 to_pass->CreateAndAppendDrawQuad<DebugBorderDrawQuad>(); 197 to_pass->CreateAndAppendDrawQuad<DebugBorderDrawQuad>();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 to_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); 271 to_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>();
273 yuv_quad->SetNew(shared_state2, rect, opaque_rect, visible_rect, 272 yuv_quad->SetNew(shared_state2, rect, opaque_rect, visible_rect,
274 gfx::RectF(.0f, .0f, 100.0f, 100.0f), 273 gfx::RectF(.0f, .0f, 100.0f, 100.0f),
275 gfx::RectF(.0f, .0f, 50.0f, 50.0f), gfx::Size(100, 100), 274 gfx::RectF(.0f, .0f, 50.0f, 50.0f), gfx::Size(100, 100),
276 gfx::Size(50, 50), plane_resources[0], plane_resources[1], 275 gfx::Size(50, 50), plane_resources[0], plane_resources[1],
277 plane_resources[2], plane_resources[3], color_space, 276 plane_resources[2], plane_resources[3], color_space,
278 gfx::ColorSpace::CreateJpeg(), 0.0, 1.0, 8); 277 gfx::ColorSpace::CreateJpeg(), 0.0, 1.0, 8);
279 } 278 }
280 279
281 } // namespace cc 280 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/data/yuv_stripes_rgba.png ('k') | cc/test/test_in_process_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698