| OLD | NEW |
| 1 diff --git a/cc/BUILD.gn b/cc/BUILD.gn | 1 diff --git a/cc/BUILD.gn b/cc/BUILD.gn |
| 2 index 2ede4ac..eee115c 100644 | 2 index 41f99e2..d6fd028 100644 |
| 3 --- a/cc/BUILD.gn | 3 --- a/cc/BUILD.gn |
| 4 +++ b/cc/BUILD.gn | 4 +++ b/cc/BUILD.gn |
| 5 @@ -222,13 +222,6 @@ component("cc") { | 5 @@ -222,13 +222,6 @@ component("cc") { |
| 6 "layers/ui_resource_layer.h", | 6 "layers/ui_resource_layer.h", |
| 7 "layers/ui_resource_layer_impl.cc", | 7 "layers/ui_resource_layer_impl.cc", |
| 8 "layers/ui_resource_layer_impl.h", | 8 "layers/ui_resource_layer_impl.h", |
| 9 - "layers/video_frame_provider.h", | 9 - "layers/video_frame_provider.h", |
| 10 - "layers/video_frame_provider_client_impl.cc", | 10 - "layers/video_frame_provider_client_impl.cc", |
| 11 - "layers/video_frame_provider_client_impl.h", | 11 - "layers/video_frame_provider_client_impl.h", |
| 12 - "layers/video_layer.cc", | 12 - "layers/video_layer.cc", |
| (...skipping 14 matching lines...) Expand all Loading... |
| 27 "scheduler/begin_frame_source.cc", | 27 "scheduler/begin_frame_source.cc", |
| 28 @@ -623,8 +614,6 @@ source_set("test_support") { | 28 @@ -623,8 +614,6 @@ source_set("test_support") { |
| 29 "test/fake_tile_manager_client.h", | 29 "test/fake_tile_manager_client.h", |
| 30 "test/fake_ui_resource_layer_tree_host_impl.cc", | 30 "test/fake_ui_resource_layer_tree_host_impl.cc", |
| 31 "test/fake_ui_resource_layer_tree_host_impl.h", | 31 "test/fake_ui_resource_layer_tree_host_impl.h", |
| 32 - "test/fake_video_frame_provider.cc", | 32 - "test/fake_video_frame_provider.cc", |
| 33 - "test/fake_video_frame_provider.h", | 33 - "test/fake_video_frame_provider.h", |
| 34 "test/failure_output_surface.cc", | 34 "test/failure_output_surface.cc", |
| 35 "test/failure_output_surface.h", | 35 "test/failure_output_surface.h", |
| 36 "test/geometry_test_utils.cc", | 36 "test/geometry_test_utils.cc", |
| 37 @@ -782,7 +771,6 @@ test("cc_unittests") { | 37 @@ -783,7 +772,6 @@ if (!is_win || link_chrome_on_windows) { |
| 38 "layers/tiled_layer_unittest.cc", | 38 "layers/tiled_layer_unittest.cc", |
| 39 "layers/ui_resource_layer_impl_unittest.cc", | 39 "layers/ui_resource_layer_impl_unittest.cc", |
| 40 "layers/ui_resource_layer_unittest.cc", | 40 "layers/ui_resource_layer_unittest.cc", |
| 41 - "layers/video_layer_impl_unittest.cc", | 41 - "layers/video_layer_impl_unittest.cc", |
| 42 "output/begin_frame_args_unittest.cc", | 42 "output/begin_frame_args_unittest.cc", |
| 43 "output/delegating_renderer_unittest.cc", | 43 "output/delegating_renderer_unittest.cc", |
| 44 "output/filter_operations_unittest.cc", | 44 "output/filter_operations_unittest.cc", |
| 45 @@ -814,7 +802,6 @@ test("cc_unittests") { | 45 @@ -815,7 +803,6 @@ if (!is_win || link_chrome_on_windows) { |
| 46 "resources/texture_uploader_unittest.cc", | 46 "resources/texture_uploader_unittest.cc", |
| 47 "resources/tile_manager_unittest.cc", | 47 "resources/tile_manager_unittest.cc", |
| 48 "resources/tile_priority_unittest.cc", | 48 "resources/tile_priority_unittest.cc", |
| 49 - "resources/video_resource_updater_unittest.cc", | 49 - "resources/video_resource_updater_unittest.cc", |
| 50 "scheduler/begin_frame_source_unittest.cc", | 50 "scheduler/begin_frame_source_unittest.cc", |
| 51 "scheduler/delay_based_time_source_unittest.cc", | 51 "scheduler/delay_based_time_source_unittest.cc", |
| 52 "scheduler/scheduler_state_machine_unittest.cc", | 52 "scheduler/scheduler_state_machine_unittest.cc", |
| 53 @@ -843,7 +830,6 @@ test("cc_unittests") { | 53 @@ -844,7 +831,6 @@ if (!is_win || link_chrome_on_windows) { |
| 54 "trees/layer_tree_host_unittest_picture.cc", | 54 "trees/layer_tree_host_unittest_picture.cc", |
| 55 "trees/layer_tree_host_unittest_proxy.cc", | 55 "trees/layer_tree_host_unittest_proxy.cc", |
| 56 "trees/layer_tree_host_unittest_scroll.cc", | 56 "trees/layer_tree_host_unittest_scroll.cc", |
| 57 - "trees/layer_tree_host_unittest_video.cc", | 57 - "trees/layer_tree_host_unittest_video.cc", |
| 58 "trees/layer_tree_impl_unittest.cc", | 58 "trees/layer_tree_impl_unittest.cc", |
| 59 "trees/occlusion_tracker_unittest.cc", | 59 "trees/occlusion_tracker_unittest.cc", |
| 60 "trees/occlusion_unittest.cc", | 60 "trees/occlusion_unittest.cc", |
| 61 diff --git a/cc/layers/video_frame_provider.h b/cc/layers/video_frame_provider.h | 61 diff --git a/cc/layers/video_frame_provider.h b/cc/layers/video_frame_provider.h |
| 62 deleted file mode 100644 | 62 deleted file mode 100644 |
| 63 index 784d951..0000000 | 63 index 784d951..0000000 |
| 64 --- a/cc/layers/video_frame_provider.h | 64 --- a/cc/layers/video_frame_provider.h |
| 65 +++ /dev/null | 65 +++ /dev/null |
| 66 @@ -1,63 +0,0 @@ | 66 @@ -1,63 +0,0 @@ |
| 67 -// Copyright (c) 2012 The Chromium Authors. All rights reserved. | 67 -// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 68 -// Use of this source code is governed by a BSD-style license that can be | 68 -// Use of this source code is governed by a BSD-style license that can be |
| 69 -// found in the LICENSE file. | 69 -// found in the LICENSE file. |
| 70 - | 70 - |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 - // should no longer be referenced after the call is made. Only the current | 121 - // should no longer be referenced after the call is made. Only the current |
| 122 - // provider client should call this function. | 122 - // provider client should call this function. |
| 123 - virtual void PutCurrentFrame( | 123 - virtual void PutCurrentFrame( |
| 124 - const scoped_refptr<media::VideoFrame>& frame) = 0; | 124 - const scoped_refptr<media::VideoFrame>& frame) = 0; |
| 125 -}; | 125 -}; |
| 126 - | 126 - |
| 127 -} // namespace cc | 127 -} // namespace cc |
| 128 - | 128 - |
| 129 -#endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ | 129 -#endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ |
| 130 diff --git a/cc/layers/video_frame_provider_client_impl.cc b/cc/layers/video_fra
me_provider_client_impl.cc | 130 diff --git a/cc/layers/video_frame_provider_client_impl.cc b/cc/layers/video_fra
me_provider_client_impl.cc |
| 131 deleted file mode 100644 | 131 index 2b12567..e69de29 100644 |
| 132 index 50333c1..0000000 | |
| 133 --- a/cc/layers/video_frame_provider_client_impl.cc | 132 --- a/cc/layers/video_frame_provider_client_impl.cc |
| 134 +++ /dev/null | 133 +++ b/cc/layers/video_frame_provider_client_impl.cc |
| 135 @@ -1,95 +0,0 @@ | 134 @@ -1,95 +0,0 @@ |
| 136 -// Copyright 2013 The Chromium Authors. All rights reserved. | 135 -// Copyright 2013 The Chromium Authors. All rights reserved. |
| 137 -// Use of this source code is governed by a BSD-style license that can be | 136 -// Use of this source code is governed by a BSD-style license that can be |
| 138 -// found in the LICENSE file. | 137 -// found in the LICENSE file. |
| 139 - | 138 - |
| 140 -#include "cc/layers/video_frame_provider_client_impl.h" | 139 -#include "cc/layers/video_frame_provider_client_impl.h" |
| 141 - | 140 - |
| 142 -#include "base/debug/trace_event.h" | 141 -#include "base/trace_event/trace_event.h" |
| 143 -#include "cc/base/math_util.h" | 142 -#include "cc/base/math_util.h" |
| 144 -#include "cc/layers/video_layer_impl.h" | 143 -#include "cc/layers/video_layer_impl.h" |
| 145 -#include "media/base/video_frame.h" | 144 -#include "media/base/video_frame.h" |
| 146 - | 145 - |
| 147 -namespace cc { | 146 -namespace cc { |
| 148 - | 147 - |
| 149 -// static | 148 -// static |
| 150 -scoped_refptr<VideoFrameProviderClientImpl> | 149 -scoped_refptr<VideoFrameProviderClientImpl> |
| 151 - VideoFrameProviderClientImpl::Create( | 150 - VideoFrameProviderClientImpl::Create( |
| 152 - VideoFrameProvider* provider) { | 151 - VideoFrameProvider* provider) { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 - matrix[0], matrix[4], matrix[8], matrix[12], | 221 - matrix[0], matrix[4], matrix[8], matrix[12], |
| 223 - matrix[1], matrix[5], matrix[9], matrix[13], | 222 - matrix[1], matrix[5], matrix[9], matrix[13], |
| 224 - matrix[2], matrix[6], matrix[10], matrix[14], | 223 - matrix[2], matrix[6], matrix[10], matrix[14], |
| 225 - matrix[3], matrix[7], matrix[11], matrix[15]); | 224 - matrix[3], matrix[7], matrix[11], matrix[15]); |
| 226 - if (active_video_layer_) | 225 - if (active_video_layer_) |
| 227 - active_video_layer_->SetNeedsRedraw(); | 226 - active_video_layer_->SetNeedsRedraw(); |
| 228 -} | 227 -} |
| 229 - | 228 - |
| 230 -} // namespace cc | 229 -} // namespace cc |
| 231 diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc | 230 diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc |
| 232 index 9c856e8..e40a4fc 100644 | 231 index 45d98b6..5a15efa 100644 |
| 233 --- a/cc/output/gl_renderer.cc | 232 --- a/cc/output/gl_renderer.cc |
| 234 +++ b/cc/output/gl_renderer.cc | 233 +++ b/cc/output/gl_renderer.cc |
| 235 @@ -13,7 +13,6 @@ | 234 @@ -13,7 +13,6 @@ |
| 236 #include "base/debug/trace_event.h" | |
| 237 #include "base/logging.h" | 235 #include "base/logging.h" |
| 236 #include "base/trace_event/trace_event.h" |
| 238 #include "cc/base/math_util.h" | 237 #include "cc/base/math_util.h" |
| 239 -#include "cc/layers/video_layer_impl.h" | 238 -#include "cc/layers/video_layer_impl.h" |
| 240 #include "cc/output/compositor_frame.h" | 239 #include "cc/output/compositor_frame.h" |
| 241 #include "cc/output/compositor_frame_metadata.h" | 240 #include "cc/output/compositor_frame_metadata.h" |
| 242 #include "cc/output/context_provider.h" | 241 #include "cc/output/context_provider.h" |
| 243 diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc | 242 diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc |
| 244 index 08a4053..c7582fe 100644 | 243 index d503cc4..c7582fe 100644 |
| 245 --- a/cc/output/renderer_pixeltest.cc | 244 --- a/cc/output/renderer_pixeltest.cc |
| 246 +++ b/cc/output/renderer_pixeltest.cc | 245 +++ b/cc/output/renderer_pixeltest.cc |
| 247 @@ -12,7 +12,6 @@ | 246 @@ -12,7 +12,6 @@ |
| 248 #include "cc/test/fake_picture_pile_impl.h" | 247 #include "cc/test/fake_picture_pile_impl.h" |
| 249 #include "cc/test/pixel_test.h" | 248 #include "cc/test/pixel_test.h" |
| 250 #include "gpu/command_buffer/client/gles2_interface.h" | 249 #include "gpu/command_buffer/client/gles2_interface.h" |
| 251 -#include "media/base/video_frame.h" | 250 -#include "media/base/video_frame.h" |
| 252 #include "third_party/skia/include/core/SkColorPriv.h" | 251 #include "third_party/skia/include/core/SkColorPriv.h" |
| 253 #include "third_party/skia/include/core/SkImageFilter.h" | 252 #include "third_party/skia/include/core/SkImageFilter.h" |
| 254 #include "third_party/skia/include/core/SkMatrix.h" | 253 #include "third_party/skia/include/core/SkMatrix.h" |
| 255 @@ -386,346 +385,6 @@ TEST_F(GLRendererPixelTest, NonPremultipliedTextureWithBac
kground) { | 254 @@ -386,453 +385,6 @@ TEST_F(GLRendererPixelTest, NonPremultipliedTextureWithBac
kground) { |
| 256 FuzzyPixelOffByOneComparator(true))); | 255 FuzzyPixelOffByOneComparator(true))); |
| 257 } | 256 } |
| 258 | 257 |
| 259 -class VideoGLRendererPixelTest : public GLRendererPixelTest { | 258 -class VideoGLRendererPixelTest : public GLRendererPixelTest { |
| 260 - protected: | 259 - protected: |
| 261 - void CreateTestYUVVideoDrawQuad_Striped(const SharedQuadState* shared_state, | 260 - void CreateTestYUVVideoDrawQuad_Striped(const SharedQuadState* shared_state, |
| 262 - media::VideoFrame::Format format, | 261 - media::VideoFrame::Format format, |
| 263 - bool is_transparent, | 262 - bool is_transparent, |
| 264 - const gfx::RectF& tex_coord_rect, | 263 - const gfx::RectF& tex_coord_rect, |
| 265 - RenderPass* render_pass) { | 264 - RenderPass* render_pass) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 286 - uint8_t* u_row = video_frame->data(media::VideoFrame::kUPlane) + | 285 - uint8_t* u_row = video_frame->data(media::VideoFrame::kUPlane) + |
| 287 - video_frame->stride(media::VideoFrame::kUPlane) * i; | 286 - video_frame->stride(media::VideoFrame::kUPlane) * i; |
| 288 - uint8_t* v_row = video_frame->data(media::VideoFrame::kVPlane) + | 287 - uint8_t* v_row = video_frame->data(media::VideoFrame::kVPlane) + |
| 289 - video_frame->stride(media::VideoFrame::kVPlane) * i; | 288 - video_frame->stride(media::VideoFrame::kVPlane) * i; |
| 290 - for (int j = 0; j < video_frame->row_bytes(media::VideoFrame::kUPlane); | 289 - for (int j = 0; j < video_frame->row_bytes(media::VideoFrame::kUPlane); |
| 291 - ++j) { | 290 - ++j) { |
| 292 - u_row[j] = (u_value += 3); | 291 - u_row[j] = (u_value += 3); |
| 293 - v_row[j] = (v_value += 5); | 292 - v_row[j] = (v_value += 5); |
| 294 - } | 293 - } |
| 295 - } | 294 - } |
| 295 - uint8 alpha_value = is_transparent ? 0 : 128; |
| 296 - CreateTestYUVVideoDrawQuad_FromVideoFrame( | 296 - CreateTestYUVVideoDrawQuad_FromVideoFrame( |
| 297 - shared_state, video_frame, is_transparent, tex_coord_rect, render_pass)
; | 297 - shared_state, video_frame, alpha_value, tex_coord_rect, render_pass); |
| 298 - } | 298 - } |
| 299 - | 299 - |
| 300 - void CreateTestYUVVideoDrawQuad_Solid(const SharedQuadState* shared_state, | 300 - void CreateTestYUVVideoDrawQuad_Solid(const SharedQuadState* shared_state, |
| 301 - media::VideoFrame::Format format, | 301 - media::VideoFrame::Format format, |
| 302 - bool is_transparent, | 302 - bool is_transparent, |
| 303 - const gfx::RectF& tex_coord_rect, | 303 - const gfx::RectF& tex_coord_rect, |
| 304 - uint8 y, | 304 - uint8 y, |
| 305 - uint8 u, | 305 - uint8 u, |
| 306 - uint8 v, | 306 - uint8 v, |
| 307 - RenderPass* render_pass) { | 307 - RenderPass* render_pass) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 319 - video_frame->rows(media::VideoFrame::kYPlane)); | 319 - video_frame->rows(media::VideoFrame::kYPlane)); |
| 320 - memset(video_frame->data(media::VideoFrame::kUPlane), | 320 - memset(video_frame->data(media::VideoFrame::kUPlane), |
| 321 - u, | 321 - u, |
| 322 - video_frame->stride(media::VideoFrame::kUPlane) * | 322 - video_frame->stride(media::VideoFrame::kUPlane) * |
| 323 - video_frame->rows(media::VideoFrame::kUPlane)); | 323 - video_frame->rows(media::VideoFrame::kUPlane)); |
| 324 - memset(video_frame->data(media::VideoFrame::kVPlane), | 324 - memset(video_frame->data(media::VideoFrame::kVPlane), |
| 325 - v, | 325 - v, |
| 326 - video_frame->stride(media::VideoFrame::kVPlane) * | 326 - video_frame->stride(media::VideoFrame::kVPlane) * |
| 327 - video_frame->rows(media::VideoFrame::kVPlane)); | 327 - video_frame->rows(media::VideoFrame::kVPlane)); |
| 328 - | 328 - |
| 329 - uint8 alpha_value = is_transparent ? 0 : 128; |
| 329 - CreateTestYUVVideoDrawQuad_FromVideoFrame( | 330 - CreateTestYUVVideoDrawQuad_FromVideoFrame( |
| 330 - shared_state, video_frame, is_transparent, tex_coord_rect, render_pass)
; | 331 - shared_state, video_frame, alpha_value, tex_coord_rect, render_pass); |
| 332 - } |
| 333 - |
| 334 - void CreateEdgeBleedPass(media::VideoFrame::Format format, |
| 335 - RenderPassList* pass_list) { |
| 336 - gfx::Rect rect(200, 200); |
| 337 - |
| 338 - RenderPassId id(1, 1); |
| 339 - scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); |
| 340 - |
| 341 - // Scale the video up so that bilinear filtering kicks in to sample more |
| 342 - // than just nearest neighbor would. |
| 343 - gfx::Transform scale_by_2; |
| 344 - scale_by_2.Scale(2.f, 2.f); |
| 345 - gfx::Rect half_rect(100, 100); |
| 346 - SharedQuadState* shared_state = |
| 347 - CreateTestSharedQuadState(scale_by_2, half_rect, pass.get()); |
| 348 - |
| 349 - gfx::Size background_size(200, 200); |
| 350 - gfx::Rect green_rect(16, 20, 100, 100); |
| 351 - gfx::RectF tex_coord_rect( |
| 352 - static_cast<float>(green_rect.x()) / background_size.width(), |
| 353 - static_cast<float>(green_rect.y()) / background_size.height(), |
| 354 - static_cast<float>(green_rect.width()) / background_size.width(), |
| 355 - static_cast<float>(green_rect.height()) / background_size.height()); |
| 356 - |
| 357 - // YUV of (149,43,21) should be green (0,255,0) in RGB. |
| 358 - // Create a video frame that has a non-green background rect, with a |
| 359 - // green sub-rectangle that should be the only thing displayed in |
| 360 - // the final image. Bleeding will appear on all four sides of the video |
| 361 - // if the tex coords are not clamped. |
| 362 - CreateTestYUVVideoDrawQuad_TwoColor(shared_state, format, false, |
| 363 - tex_coord_rect, background_size, 0, 0, |
| 364 - 0, green_rect, 149, 43, 21, pass.get())
; |
| 365 - pass_list->push_back(pass.Pass()); |
| 366 - } |
| 367 - |
| 368 - // Creates a video frame of size background_size filled with yuv_background, |
| 369 - // and then draws a foreground rectangle in a different color on top of |
| 370 - // that. The foreground rectangle must have coordinates that are divisible |
| 371 - // by 2 because YUV is a block format. |
| 372 - void CreateTestYUVVideoDrawQuad_TwoColor(const SharedQuadState* shared_state, |
| 373 - media::VideoFrame::Format format, |
| 374 - bool is_transparent, |
| 375 - const gfx::RectF& tex_coord_rect, |
| 376 - const gfx::Size& background_size, |
| 377 - uint8 y_background, |
| 378 - uint8 u_background, |
| 379 - uint8 v_background, |
| 380 - const gfx::Rect& foreground_rect, |
| 381 - uint8 y_foreground, |
| 382 - uint8 u_foreground, |
| 383 - uint8 v_foreground, |
| 384 - RenderPass* render_pass) { |
| 385 - const gfx::Rect rect(background_size); |
| 386 - |
| 387 - scoped_refptr<media::VideoFrame> video_frame = |
| 388 - media::VideoFrame::CreateFrame(format, background_size, foreground_rect
, |
| 389 - foreground_rect.size(), |
| 390 - base::TimeDelta()); |
| 391 - |
| 392 - int planes[] = {media::VideoFrame::kYPlane, |
| 393 - media::VideoFrame::kUPlane, |
| 394 - media::VideoFrame::kVPlane}; |
| 395 - uint8 yuv_background[] = {y_background, u_background, v_background}; |
| 396 - uint8 yuv_foreground[] = {y_foreground, u_foreground, v_foreground}; |
| 397 - int sample_size[] = {1, 2, 2}; |
| 398 - |
| 399 - for (int i = 0; i < 3; ++i) { |
| 400 - memset(video_frame->data(planes[i]), yuv_background[i], |
| 401 - video_frame->stride(planes[i]) * video_frame->rows(planes[i])); |
| 402 - } |
| 403 - |
| 404 - for (int i = 0; i < 3; ++i) { |
| 405 - // Since yuv encoding uses block encoding, widths have to be divisible |
| 406 - // by the sample size in order for this function to behave properly. |
| 407 - DCHECK_EQ(foreground_rect.x() % sample_size[i], 0); |
| 408 - DCHECK_EQ(foreground_rect.y() % sample_size[i], 0); |
| 409 - DCHECK_EQ(foreground_rect.width() % sample_size[i], 0); |
| 410 - DCHECK_EQ(foreground_rect.height() % sample_size[i], 0); |
| 411 - |
| 412 - gfx::Rect sample_rect(foreground_rect.x() / sample_size[i], |
| 413 - foreground_rect.y() / sample_size[i], |
| 414 - foreground_rect.width() / sample_size[i], |
| 415 - foreground_rect.height() / sample_size[i]); |
| 416 - for (int y = sample_rect.y(); y < sample_rect.bottom(); ++y) { |
| 417 - for (int x = sample_rect.x(); x < sample_rect.right(); ++x) { |
| 418 - size_t offset = y * video_frame->stride(planes[i]) + x; |
| 419 - video_frame->data(planes[i])[offset] = yuv_foreground[i]; |
| 420 - } |
| 421 - } |
| 422 - } |
| 423 - |
| 424 - uint8 alpha_value = 255; |
| 425 - CreateTestYUVVideoDrawQuad_FromVideoFrame( |
| 426 - shared_state, video_frame, alpha_value, tex_coord_rect, render_pass); |
| 331 - } | 427 - } |
| 332 - | 428 - |
| 333 - void CreateTestYUVVideoDrawQuad_FromVideoFrame( | 429 - void CreateTestYUVVideoDrawQuad_FromVideoFrame( |
| 334 - const SharedQuadState* shared_state, | 430 - const SharedQuadState* shared_state, |
| 335 - scoped_refptr<media::VideoFrame> video_frame, | 431 - scoped_refptr<media::VideoFrame> video_frame, |
| 336 - bool is_transparent, | 432 - uint8 alpha_value, |
| 337 - const gfx::RectF& tex_coord_rect, | 433 - const gfx::RectF& tex_coord_rect, |
| 338 - RenderPass* render_pass) { | 434 - RenderPass* render_pass) { |
| 339 - const bool with_alpha = (video_frame->format() == media::VideoFrame::YV12A)
; | 435 - const bool with_alpha = (video_frame->format() == media::VideoFrame::YV12A)
; |
| 340 - const YUVVideoDrawQuad::ColorSpace color_space = | 436 - const YUVVideoDrawQuad::ColorSpace color_space = |
| 341 - (video_frame->format() == media::VideoFrame::YV12J | 437 - (video_frame->format() == media::VideoFrame::YV12J |
| 342 - ? YUVVideoDrawQuad::REC_601_JPEG | 438 - ? YUVVideoDrawQuad::REC_601_JPEG |
| 343 - : YUVVideoDrawQuad::REC_601); | 439 - : YUVVideoDrawQuad::REC_601); |
| 344 - const gfx::Rect rect(this->device_viewport_size_); | 440 - const gfx::Rect rect(shared_state->content_bounds); |
| 345 - const gfx::Rect opaque_rect(0, 0, 0, 0); | 441 - const gfx::Rect opaque_rect(0, 0, 0, 0); |
| 346 - | 442 - |
| 347 - if (with_alpha) | 443 - if (with_alpha) |
| 348 - memset(video_frame->data(media::VideoFrame::kAPlane), | 444 - memset(video_frame->data(media::VideoFrame::kAPlane), alpha_value, |
| 349 - is_transparent ? 0 : 128, | |
| 350 - video_frame->stride(media::VideoFrame::kAPlane) * | 445 - video_frame->stride(media::VideoFrame::kAPlane) * |
| 351 - video_frame->rows(media::VideoFrame::kAPlane)); | 446 - video_frame->rows(media::VideoFrame::kAPlane)); |
| 352 - | 447 - |
| 353 - VideoFrameExternalResources resources = | 448 - VideoFrameExternalResources resources = |
| 354 - video_resource_updater_->CreateExternalResourcesFromVideoFrame( | 449 - video_resource_updater_->CreateExternalResourcesFromVideoFrame( |
| 355 - video_frame); | 450 - video_frame); |
| 356 - | 451 - |
| 357 - EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type); | 452 - EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type); |
| 358 - EXPECT_EQ(media::VideoFrame::NumPlanes(video_frame->format()), | 453 - EXPECT_EQ(media::VideoFrame::NumPlanes(video_frame->format()), |
| 359 - resources.mailboxes.size()); | 454 - resources.mailboxes.size()); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 378 - ResourceProvider::ResourceId a_resource = 0; | 473 - ResourceProvider::ResourceId a_resource = 0; |
| 379 - if (with_alpha) { | 474 - if (with_alpha) { |
| 380 - a_resource = resource_provider_->CreateResourceFromTextureMailbox( | 475 - a_resource = resource_provider_->CreateResourceFromTextureMailbox( |
| 381 - resources.mailboxes[media::VideoFrame::kAPlane], | 476 - resources.mailboxes[media::VideoFrame::kAPlane], |
| 382 - SingleReleaseCallbackImpl::Create( | 477 - SingleReleaseCallbackImpl::Create( |
| 383 - resources.release_callbacks[media::VideoFrame::kAPlane])); | 478 - resources.release_callbacks[media::VideoFrame::kAPlane])); |
| 384 - } | 479 - } |
| 385 - | 480 - |
| 386 - YUVVideoDrawQuad* yuv_quad = | 481 - YUVVideoDrawQuad* yuv_quad = |
| 387 - render_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); | 482 - render_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); |
| 388 - yuv_quad->SetNew(shared_state, | 483 - yuv_quad->SetNew(shared_state, rect, opaque_rect, rect, tex_coord_rect, |
| 389 - rect, | 484 - video_frame->coded_size(), y_resource, u_resource, |
| 390 - opaque_rect, | 485 - v_resource, a_resource, color_space); |
| 391 - rect, | |
| 392 - tex_coord_rect, | |
| 393 - y_resource, | |
| 394 - u_resource, | |
| 395 - v_resource, | |
| 396 - a_resource, | |
| 397 - color_space); | |
| 398 - } | 486 - } |
| 399 - | 487 - |
| 400 - void SetUp() override { | 488 - void SetUp() override { |
| 401 - GLRendererPixelTest::SetUp(); | 489 - GLRendererPixelTest::SetUp(); |
| 402 - video_resource_updater_.reset(new VideoResourceUpdater( | 490 - video_resource_updater_.reset(new VideoResourceUpdater( |
| 403 - output_surface_->context_provider(), resource_provider_.get())); | 491 - output_surface_->context_provider(), resource_provider_.get())); |
| 404 - } | 492 - } |
| 405 - | 493 - |
| 406 - private: | 494 - private: |
| 407 - scoped_ptr<VideoResourceUpdater> video_resource_updater_; | 495 - scoped_ptr<VideoResourceUpdater> video_resource_updater_; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 - pass.get()); | 593 - pass.get()); |
| 506 - | 594 - |
| 507 - RenderPassList pass_list; | 595 - RenderPassList pass_list; |
| 508 - pass_list.push_back(pass.Pass()); | 596 - pass_list.push_back(pass.Pass()); |
| 509 - | 597 - |
| 510 - EXPECT_TRUE(this->RunPixelTest(&pass_list, | 598 - EXPECT_TRUE(this->RunPixelTest(&pass_list, |
| 511 - base::FilePath(FILE_PATH_LITERAL("green.png"))
, | 599 - base::FilePath(FILE_PATH_LITERAL("green.png"))
, |
| 512 - FuzzyPixelOffByOneComparator(true))); | 600 - FuzzyPixelOffByOneComparator(true))); |
| 513 -} | 601 -} |
| 514 - | 602 - |
| 603 -// Test that a YUV video doesn't bleed outside of its tex coords when the |
| 604 -// tex coord rect is only a partial subrectangle of the coded contents. |
| 605 -TEST_F(VideoGLRendererPixelTest, YUVEdgeBleed) { |
| 606 - RenderPassList pass_list; |
| 607 - CreateEdgeBleedPass(media::VideoFrame::YV12J, &pass_list); |
| 608 - EXPECT_TRUE(this->RunPixelTest(&pass_list, |
| 609 - base::FilePath(FILE_PATH_LITERAL("green.png"))
, |
| 610 - FuzzyPixelOffByOneComparator(true))); |
| 611 -} |
| 612 - |
| 613 -TEST_F(VideoGLRendererPixelTest, YUVAEdgeBleed) { |
| 614 - RenderPassList pass_list; |
| 615 - CreateEdgeBleedPass(media::VideoFrame::YV12A, &pass_list); |
| 616 - EXPECT_TRUE(this->RunPixelTest(&pass_list, |
| 617 - base::FilePath(FILE_PATH_LITERAL("green.png"))
, |
| 618 - FuzzyPixelOffByOneComparator(true))); |
| 619 -} |
| 620 - |
| 515 -TEST_F(VideoGLRendererPixelTest, SimpleYUVJRectGrey) { | 621 -TEST_F(VideoGLRendererPixelTest, SimpleYUVJRectGrey) { |
| 516 - gfx::Rect rect(this->device_viewport_size_); | 622 - gfx::Rect rect(this->device_viewport_size_); |
| 517 - | 623 - |
| 518 - RenderPassId id(1, 1); | 624 - RenderPassId id(1, 1); |
| 519 - scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); | 625 - scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); |
| 520 - | 626 - |
| 521 - SharedQuadState* shared_state = | 627 - SharedQuadState* shared_state = |
| 522 - CreateTestSharedQuadState(gfx::Transform(), rect, pass.get()); | 628 - CreateTestSharedQuadState(gfx::Transform(), rect, pass.get()); |
| 523 - | 629 - |
| 524 - // Dark grey in JPEG color range (in MPEG, this is black). | 630 - // Dark grey in JPEG color range (in MPEG, this is black). |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 - EXPECT_TRUE(this->RunPixelTest( | 699 - EXPECT_TRUE(this->RunPixelTest( |
| 594 - &pass_list, | 700 - &pass_list, |
| 595 - base::FilePath(FILE_PATH_LITERAL("black.png")), | 701 - base::FilePath(FILE_PATH_LITERAL("black.png")), |
| 596 - ExactPixelComparator(true))); | 702 - ExactPixelComparator(true))); |
| 597 -} | 703 -} |
| 598 - | 704 - |
| 599 TYPED_TEST(RendererPixelTest, FastPassColorFilterAlpha) { | 705 TYPED_TEST(RendererPixelTest, FastPassColorFilterAlpha) { |
| 600 gfx::Rect viewport_rect(this->device_viewport_size_); | 706 gfx::Rect viewport_rect(this->device_viewport_size_); |
| 601 | 707 |
| 602 diff --git a/cc/quads/yuv_video_draw_quad.h b/cc/quads/yuv_video_draw_quad.h | 708 diff --git a/cc/quads/yuv_video_draw_quad.h b/cc/quads/yuv_video_draw_quad.h |
| 603 index e1c5410..edda34a 100644 | 709 index 61f11a2..7ad0ba4 100644 |
| 604 --- a/cc/quads/yuv_video_draw_quad.h | 710 --- a/cc/quads/yuv_video_draw_quad.h |
| 605 +++ b/cc/quads/yuv_video_draw_quad.h | 711 +++ b/cc/quads/yuv_video_draw_quad.h |
| 606 @@ -8,7 +8,6 @@ | 712 @@ -8,7 +8,6 @@ |
| 607 #include "base/basictypes.h" | 713 #include "base/basictypes.h" |
| 608 #include "base/memory/scoped_ptr.h" | 714 #include "base/memory/scoped_ptr.h" |
| 609 #include "cc/base/cc_export.h" | 715 #include "cc/base/cc_export.h" |
| 610 -#include "cc/layers/video_layer_impl.h" | 716 -#include "cc/layers/video_layer_impl.h" |
| 611 #include "cc/quads/draw_quad.h" | 717 #include "cc/quads/draw_quad.h" |
| 612 | 718 |
| 613 namespace cc { | 719 namespace cc { |
| 614 diff --git a/cc/resources/drawing_display_item.cc b/cc/resources/drawing_display
_item.cc | 720 diff --git a/cc/resources/drawing_display_item.cc b/cc/resources/drawing_display
_item.cc |
| 615 index e5610ca..473cb77 100644 | 721 index 29cc2d3..351fade 100644 |
| 616 --- a/cc/resources/drawing_display_item.cc | 722 --- a/cc/resources/drawing_display_item.cc |
| 617 +++ b/cc/resources/drawing_display_item.cc | 723 +++ b/cc/resources/drawing_display_item.cc |
| 618 @@ -4,6 +4,7 @@ | 724 @@ -6,6 +6,7 @@ |
| 619 | 725 |
| 620 #include "cc/resources/drawing_display_item.h" | 726 #include <string> |
| 621 | 727 |
| 622 +#include "base/logging.h" | 728 +#include "base/logging.h" |
| 623 #include "third_party/skia/include/core/SkCanvas.h" | 729 #include "base/strings/stringprintf.h" |
| 624 #include "third_party/skia/include/core/SkDrawPictureCallback.h" | 730 #include "base/trace_event/trace_event_argument.h" |
| 625 #include "third_party/skia/include/core/SkMatrix.h" | 731 #include "cc/debug/picture_debug_util.h" |
| 626 diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_hos
t_impl_unittest.cc | 732 diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_hos
t_impl_unittest.cc |
| 627 index 6ac2f8c..7804f22 100644 | 733 index cb33686..b016fff 100644 |
| 628 --- a/cc/trees/layer_tree_host_impl_unittest.cc | 734 --- a/cc/trees/layer_tree_host_impl_unittest.cc |
| 629 +++ b/cc/trees/layer_tree_host_impl_unittest.cc | 735 +++ b/cc/trees/layer_tree_host_impl_unittest.cc |
| 630 @@ -27,7 +27,6 @@ | 736 @@ -27,7 +27,6 @@ |
| 631 #include "cc/layers/solid_color_scrollbar_layer_impl.h" | 737 #include "cc/layers/solid_color_scrollbar_layer_impl.h" |
| 632 #include "cc/layers/texture_layer_impl.h" | 738 #include "cc/layers/texture_layer_impl.h" |
| 633 #include "cc/layers/tiled_layer_impl.h" | 739 #include "cc/layers/tiled_layer_impl.h" |
| 634 -#include "cc/layers/video_layer_impl.h" | 740 -#include "cc/layers/video_layer_impl.h" |
| 635 #include "cc/output/begin_frame_args.h" | 741 #include "cc/output/begin_frame_args.h" |
| 636 #include "cc/output/compositor_frame_ack.h" | 742 #include "cc/output/compositor_frame_ack.h" |
| 637 #include "cc/output/compositor_frame_metadata.h" | 743 #include "cc/output/compositor_frame_metadata.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 660 namespace cc { | 766 namespace cc { |
| 661 namespace { | 767 namespace { |
| 662 @@ -96,7 +92,6 @@ class LayerTreeHostImplTest : public testing::Test, | 768 @@ -96,7 +92,6 @@ class LayerTreeHostImplTest : public testing::Test, |
| 663 reduce_memory_result_(true), | 769 reduce_memory_result_(true), |
| 664 current_limit_bytes_(0), | 770 current_limit_bytes_(0), |
| 665 current_priority_cutoff_value_(0) { | 771 current_priority_cutoff_value_(0) { |
| 666 - media::InitializeMediaLibraryForTesting(); | 772 - media::InitializeMediaLibraryForTesting(); |
| 667 } | 773 } |
| 668 | 774 |
| 669 LayerTreeSettings DefaultSettings() { | 775 LayerTreeSettings DefaultSettings() { |
| 670 @@ -5308,18 +5303,6 @@ TEST_F(LayerTreeHostImplTest, LayersFreeTextures) { | 776 @@ -5312,18 +5307,6 @@ TEST_F(LayerTreeHostImplTest, LayersFreeTextures) { |
| 671 root_layer->SetBounds(gfx::Size(10, 10)); | 777 root_layer->SetBounds(gfx::Size(10, 10)); |
| 672 root_layer->SetHasRenderSurface(true); | 778 root_layer->SetHasRenderSurface(true); |
| 673 | 779 |
| 674 - scoped_refptr<VideoFrame> softwareFrame = | 780 - scoped_refptr<VideoFrame> softwareFrame = |
| 675 - media::VideoFrame::CreateColorFrame( | 781 - media::VideoFrame::CreateColorFrame( |
| 676 - gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); | 782 - gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); |
| 677 - FakeVideoFrameProvider provider; | 783 - FakeVideoFrameProvider provider; |
| 678 - provider.set_frame(softwareFrame); | 784 - provider.set_frame(softwareFrame); |
| 679 - scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create( | 785 - scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create( |
| 680 - host_impl_->active_tree(), 4, &provider, media::VIDEO_ROTATION_0); | 786 - host_impl_->active_tree(), 4, &provider, media::VIDEO_ROTATION_0); |
| 681 - video_layer->SetBounds(gfx::Size(10, 10)); | 787 - video_layer->SetBounds(gfx::Size(10, 10)); |
| 682 - video_layer->SetContentBounds(gfx::Size(10, 10)); | 788 - video_layer->SetContentBounds(gfx::Size(10, 10)); |
| 683 - video_layer->SetDrawsContent(true); | 789 - video_layer->SetDrawsContent(true); |
| 684 - root_layer->AddChild(video_layer.Pass()); | 790 - root_layer->AddChild(video_layer.Pass()); |
| 685 - | 791 - |
| 686 scoped_ptr<IOSurfaceLayerImpl> io_surface_layer = | 792 scoped_ptr<IOSurfaceLayerImpl> io_surface_layer = |
| 687 IOSurfaceLayerImpl::Create(host_impl_->active_tree(), 5); | 793 IOSurfaceLayerImpl::Create(host_impl_->active_tree(), 5); |
| 688 io_surface_layer->SetBounds(gfx::Size(10, 10)); | 794 io_surface_layer->SetBounds(gfx::Size(10, 10)); |
| 689 @@ -6399,16 +6382,6 @@ TEST_F(LayerTreeHostImplTest, | 795 @@ -6403,16 +6386,6 @@ TEST_F(LayerTreeHostImplTest, |
| 690 scoped_ptr<SolidColorLayerImpl> root_layer = | 796 scoped_ptr<SolidColorLayerImpl> root_layer = |
| 691 SolidColorLayerImpl::Create(host_impl_->active_tree(), 1); | 797 SolidColorLayerImpl::Create(host_impl_->active_tree(), 1); |
| 692 | 798 |
| 693 - // VideoLayerImpl will not be drawn. | 799 - // VideoLayerImpl will not be drawn. |
| 694 - FakeVideoFrameProvider provider; | 800 - FakeVideoFrameProvider provider; |
| 695 - scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create( | 801 - scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create( |
| 696 - host_impl_->active_tree(), 2, &provider, media::VIDEO_ROTATION_0); | 802 - host_impl_->active_tree(), 2, &provider, media::VIDEO_ROTATION_0); |
| 697 - video_layer->SetBounds(gfx::Size(10, 10)); | 803 - video_layer->SetBounds(gfx::Size(10, 10)); |
| 698 - video_layer->SetContentBounds(gfx::Size(10, 10)); | 804 - video_layer->SetContentBounds(gfx::Size(10, 10)); |
| 699 - video_layer->SetDrawsContent(true); | 805 - video_layer->SetDrawsContent(true); |
| 700 - root_layer->AddChild(video_layer.Pass()); | 806 - root_layer->AddChild(video_layer.Pass()); |
| 701 - SetupRootLayerImpl(root_layer.Pass()); | 807 - SetupRootLayerImpl(root_layer.Pass()); |
| 702 - | 808 - |
| 703 LayerTreeHostImpl::FrameData frame; | 809 LayerTreeHostImpl::FrameData frame; |
| 704 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); | 810 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); |
| 705 host_impl_->DrawLayers(&frame, gfx::FrameTime::Now()); | 811 host_impl_->DrawLayers(&frame, gfx::FrameTime::Now()); |
| 706 diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_uni
ttest.cc | 812 diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_uni
ttest.cc |
| 707 index 5299d70..1e10588 100644 | 813 index a3c37ed..d4bfb6e 100644 |
| 708 --- a/cc/trees/layer_tree_host_unittest.cc | 814 --- a/cc/trees/layer_tree_host_unittest.cc |
| 709 +++ b/cc/trees/layer_tree_host_unittest.cc | 815 +++ b/cc/trees/layer_tree_host_unittest.cc |
| 710 @@ -18,7 +18,6 @@ | 816 @@ -18,7 +18,6 @@ |
| 711 #include "cc/layers/painted_scrollbar_layer.h" | 817 #include "cc/layers/painted_scrollbar_layer.h" |
| 712 #include "cc/layers/picture_layer.h" | 818 #include "cc/layers/picture_layer.h" |
| 713 #include "cc/layers/solid_color_layer.h" | 819 #include "cc/layers/solid_color_layer.h" |
| 714 -#include "cc/layers/video_layer.h" | 820 -#include "cc/layers/video_layer.h" |
| 715 #include "cc/output/begin_frame_args.h" | 821 #include "cc/output/begin_frame_args.h" |
| 716 #include "cc/output/compositor_frame_ack.h" | 822 #include "cc/output/compositor_frame_ack.h" |
| 717 #include "cc/output/copy_output_request.h" | 823 #include "cc/output/copy_output_request.h" |
| 718 @@ -41,7 +40,6 @@ | 824 @@ -41,7 +40,6 @@ |
| 719 #include "cc/test/fake_picture_pile.h" | 825 #include "cc/test/fake_picture_pile.h" |
| 720 #include "cc/test/fake_proxy.h" | 826 #include "cc/test/fake_proxy.h" |
| 721 #include "cc/test/fake_scoped_ui_resource.h" | 827 #include "cc/test/fake_scoped_ui_resource.h" |
| 722 -#include "cc/test/fake_video_frame_provider.h" | 828 -#include "cc/test/fake_video_frame_provider.h" |
| 723 #include "cc/test/geometry_test_utils.h" | 829 #include "cc/test/geometry_test_utils.h" |
| 724 #include "cc/test/impl_side_painting_settings.h" | 830 #include "cc/test/impl_side_painting_settings.h" |
| 725 #include "cc/test/layer_tree_test.h" | 831 #include "cc/test/layer_tree_test.h" |
| 726 @@ -4193,28 +4191,6 @@ class LayerInvalidateCausesDraw : public LayerTreeHostTes
t { | 832 @@ -4200,28 +4198,6 @@ class LayerInvalidateCausesDraw : public LayerTreeHostTes
t { |
| 727 int num_draws_; | 833 int num_draws_; |
| 728 }; | 834 }; |
| 729 | 835 |
| 730 -// VideoLayer must support being invalidated and then passing that along | 836 -// VideoLayer must support being invalidated and then passing that along |
| 731 -// to the compositor thread, even though no resources are updated in | 837 -// to the compositor thread, even though no resources are updated in |
| 732 -// response to that invalidation. | 838 -// response to that invalidation. |
| 733 -class LayerTreeHostTestVideoLayerInvalidate : public LayerInvalidateCausesDraw
{ | 839 -class LayerTreeHostTestVideoLayerInvalidate : public LayerInvalidateCausesDraw
{ |
| 734 - public: | 840 - public: |
| 735 - void SetupTree() override { | 841 - void SetupTree() override { |
| 736 - LayerTreeHostTest::SetupTree(); | 842 - LayerTreeHostTest::SetupTree(); |
| 737 - scoped_refptr<VideoLayer> video_layer = | 843 - scoped_refptr<VideoLayer> video_layer = |
| 738 - VideoLayer::Create(&provider_, media::VIDEO_ROTATION_0); | 844 - VideoLayer::Create(&provider_, media::VIDEO_ROTATION_0); |
| 739 - video_layer->SetBounds(gfx::Size(10, 10)); | 845 - video_layer->SetBounds(gfx::Size(10, 10)); |
| 740 - video_layer->SetIsDrawable(true); | 846 - video_layer->SetIsDrawable(true); |
| 741 - layer_tree_host()->root_layer()->AddChild(video_layer); | 847 - layer_tree_host()->root_layer()->AddChild(video_layer); |
| 742 - | 848 - |
| 743 - invalidate_layer_ = video_layer; | 849 - invalidate_layer_ = video_layer; |
| 744 - } | 850 - } |
| 745 - | 851 - |
| 746 - private: | 852 - private: |
| 747 - FakeVideoFrameProvider provider_; | 853 - FakeVideoFrameProvider provider_; |
| 748 -}; | 854 -}; |
| 749 - | 855 - |
| 750 -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestVideoLayerInvalidate); | 856 -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestVideoLayerInvalidate); |
| 751 - | 857 - |
| 752 // IOSurfaceLayer must support being invalidated and then passing that along | 858 // IOSurfaceLayer must support being invalidated and then passing that along |
| 753 // to the compositor thread, even though no resources are updated in | 859 // to the compositor thread, even though no resources are updated in |
| 754 // response to that invalidation. | 860 // response to that invalidation. |
| 755 diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_
host_unittest_context.cc | 861 diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_
host_unittest_context.cc |
| 756 index 681ae4e..cc4f28f 100644 | 862 index 56e52ad..fb0c9c8 100644 |
| 757 --- a/cc/trees/layer_tree_host_unittest_context.cc | 863 --- a/cc/trees/layer_tree_host_unittest_context.cc |
| 758 +++ b/cc/trees/layer_tree_host_unittest_context.cc | 864 +++ b/cc/trees/layer_tree_host_unittest_context.cc |
| 759 @@ -15,8 +15,6 @@ | 865 @@ -15,8 +15,6 @@ |
| 760 #include "cc/layers/picture_layer.h" | 866 #include "cc/layers/picture_layer.h" |
| 761 #include "cc/layers/texture_layer.h" | 867 #include "cc/layers/texture_layer.h" |
| 762 #include "cc/layers/texture_layer_impl.h" | 868 #include "cc/layers/texture_layer_impl.h" |
| 763 -#include "cc/layers/video_layer.h" | 869 -#include "cc/layers/video_layer.h" |
| 764 -#include "cc/layers/video_layer_impl.h" | 870 -#include "cc/layers/video_layer_impl.h" |
| 765 #include "cc/output/filter_operations.h" | 871 #include "cc/output/filter_operations.h" |
| 766 #include "cc/resources/single_release_callback.h" | 872 #include "cc/resources/single_release_callback.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 784 namespace cc { | 890 namespace cc { |
| 785 namespace { | 891 namespace { |
| 786 @@ -66,7 +60,6 @@ class LayerTreeHostContextTest : public LayerTreeTest { | 892 @@ -66,7 +60,6 @@ class LayerTreeHostContextTest : public LayerTreeTest { |
| 787 context_should_support_io_surface_(false), | 893 context_should_support_io_surface_(false), |
| 788 fallback_context_works_(false), | 894 fallback_context_works_(false), |
| 789 async_output_surface_creation_(false) { | 895 async_output_surface_creation_(false) { |
| 790 - media::InitializeMediaLibraryForTesting(); | 896 - media::InitializeMediaLibraryForTesting(); |
| 791 } | 897 } |
| 792 | 898 |
| 793 void LoseContext() { | 899 void LoseContext() { |
| 794 @@ -1041,43 +1034,6 @@ class LayerTreeHostContextTestDontUseLostResources | 900 @@ -1057,43 +1050,6 @@ class LayerTreeHostContextTestDontUseLostResources |
| 795 layer_with_mask->SetMaskLayer(mask.get()); | 901 layer_with_mask->SetMaskLayer(mask.get()); |
| 796 root->AddChild(layer_with_mask); | 902 root->AddChild(layer_with_mask); |
| 797 | 903 |
| 798 - scoped_refptr<VideoLayer> video_color = | 904 - scoped_refptr<VideoLayer> video_color = |
| 799 - VideoLayer::Create(&color_frame_provider_, media::VIDEO_ROTATION_0); | 905 - VideoLayer::Create(&color_frame_provider_, media::VIDEO_ROTATION_0); |
| 800 - video_color->SetBounds(gfx::Size(10, 10)); | 906 - video_color->SetBounds(gfx::Size(10, 10)); |
| 801 - video_color->SetIsDrawable(true); | 907 - video_color->SetIsDrawable(true); |
| 802 - root->AddChild(video_color); | 908 - root->AddChild(video_color); |
| 803 - | 909 - |
| 804 - scoped_refptr<VideoLayer> video_hw = | 910 - scoped_refptr<VideoLayer> video_hw = |
| (...skipping 23 matching lines...) Expand all Loading... |
| 828 - gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4), base::TimeDelta(), | 934 - gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4), base::TimeDelta(), |
| 829 - VideoFrame::ReadPixelsCB(), false); | 935 - VideoFrame::ReadPixelsCB(), false); |
| 830 - | 936 - |
| 831 - color_frame_provider_.set_frame(color_video_frame_); | 937 - color_frame_provider_.set_frame(color_video_frame_); |
| 832 - hw_frame_provider_.set_frame(hw_video_frame_); | 938 - hw_frame_provider_.set_frame(hw_video_frame_); |
| 833 - scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_); | 939 - scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_); |
| 834 - | 940 - |
| 835 if (!delegating_renderer()) { | 941 if (!delegating_renderer()) { |
| 836 // TODO(danakj): IOSurface layer can not be transported. crbug.com/239335 | 942 // TODO(danakj): IOSurface layer can not be transported. crbug.com/239335 |
| 837 scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create(); | 943 scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create(); |
| 838 @@ -1107,14 +1063,6 @@ class LayerTreeHostContextTestDontUseLostResources | 944 @@ -1123,14 +1079,6 @@ class LayerTreeHostContextTestDontUseLostResources |
| 839 | 945 |
| 840 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { | 946 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { |
| 841 LayerTreeHostContextTest::CommitCompleteOnThread(host_impl); | 947 LayerTreeHostContextTest::CommitCompleteOnThread(host_impl); |
| 842 - | 948 - |
| 843 - if (host_impl->active_tree()->source_frame_number() == 3) { | 949 - if (host_impl->active_tree()->source_frame_number() == 3) { |
| 844 - // On the third commit we're recovering from context loss. Hardware | 950 - // On the third commit we're recovering from context loss. Hardware |
| 845 - // video frames should not be reused by the VideoFrameProvider, but | 951 - // video frames should not be reused by the VideoFrameProvider, but |
| 846 - // software frames can be. | 952 - // software frames can be. |
| 847 - hw_frame_provider_.set_frame(NULL); | 953 - hw_frame_provider_.set_frame(NULL); |
| 848 - scaled_hw_frame_provider_.set_frame(NULL); | 954 - scaled_hw_frame_provider_.set_frame(NULL); |
| 849 - } | 955 - } |
| 850 } | 956 } |
| 851 | 957 |
| 852 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, | 958 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
| 853 @@ -1163,14 +1111,6 @@ class LayerTreeHostContextTestDontUseLostResources | 959 @@ -1179,14 +1127,6 @@ class LayerTreeHostContextTestDontUseLostResources |
| 854 scoped_refptr<DelegatedFrameResourceCollection> | 960 scoped_refptr<DelegatedFrameResourceCollection> |
| 855 delegated_resource_collection_; | 961 delegated_resource_collection_; |
| 856 scoped_refptr<DelegatedFrameProvider> delegated_frame_provider_; | 962 scoped_refptr<DelegatedFrameProvider> delegated_frame_provider_; |
| 857 - | 963 - |
| 858 - scoped_refptr<VideoFrame> color_video_frame_; | 964 - scoped_refptr<VideoFrame> color_video_frame_; |
| 859 - scoped_refptr<VideoFrame> hw_video_frame_; | 965 - scoped_refptr<VideoFrame> hw_video_frame_; |
| 860 - scoped_refptr<VideoFrame> scaled_hw_video_frame_; | 966 - scoped_refptr<VideoFrame> scaled_hw_video_frame_; |
| 861 - | 967 - |
| 862 - FakeVideoFrameProvider color_frame_provider_; | 968 - FakeVideoFrameProvider color_frame_provider_; |
| 863 - FakeVideoFrameProvider hw_frame_provider_; | 969 - FakeVideoFrameProvider hw_frame_provider_; |
| 864 - FakeVideoFrameProvider scaled_hw_frame_provider_; | 970 - FakeVideoFrameProvider scaled_hw_frame_provider_; |
| 865 }; | 971 }; |
| 866 | 972 |
| 867 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources); | 973 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources); |
| OLD | NEW |