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

Unified Diff: media/gpu/android_deferred_rendering_backing_strategy.cc

Issue 1882373004: Migrate content/common/gpu/media code to media/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix several more bot-identified build issues Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: media/gpu/android_deferred_rendering_backing_strategy.cc
diff --git a/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc b/media/gpu/android_deferred_rendering_backing_strategy.cc
similarity index 97%
rename from content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
rename to media/gpu/android_deferred_rendering_backing_strategy.cc
index 6be34608aae10845336654f356ccd74a1797acf3..37ff79d542fc8e3ffb1c48c7885a6a4171fcab63 100644
--- a/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
+++ b/media/gpu/android_deferred_rendering_backing_strategy.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/common/gpu/media/android_deferred_rendering_backing_strategy.h"
+#include "media/gpu/android_deferred_rendering_backing_strategy.h"
#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -12,15 +12,15 @@
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
-#include "content/common/gpu/media/avda_codec_image.h"
-#include "content/common/gpu/media/avda_return_on_failure.h"
-#include "content/common/gpu/media/avda_shared_state.h"
#include "gpu/command_buffer/service/context_group.h"
#include "gpu/command_buffer/service/gl_stream_texture_image.h"
#include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "gpu/ipc/common/gpu_surface_lookup.h"
#include "gpu/ipc/service/gpu_channel.h"
+#include "media/gpu/avda_codec_image.h"
+#include "media/gpu/avda_return_on_failure.h"
+#include "media/gpu/avda_shared_state.h"
#include "ui/gl/android/surface_texture.h"
#include "ui/gl/egl_util.h"
#include "ui/gl/gl_bindings.h"
@@ -28,7 +28,7 @@
#include "ui/gl/scoped_binders.h"
#include "ui/gl/scoped_make_current.h"
-namespace content {
+namespace media {
AndroidDeferredRenderingBackingStrategy::
AndroidDeferredRenderingBackingStrategy(AVDAStateProvider* state_provider)
@@ -303,8 +303,6 @@ void AndroidDeferredRenderingBackingStrategy::CopySurfaceTextureToPictures(
GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
}
-
-
float transform_matrix[16];
surface_texture_->GetTransformMatrix(transform_matrix);
@@ -348,8 +346,7 @@ void AndroidDeferredRenderingBackingStrategy::CopySurfaceTextureToPictures(
EGLBoolean result =
eglDestroyImageKHR(gfx::GLSurfaceEGL::GetHardwareDisplay(), egl_image);
if (result == EGL_FALSE) {
- DLOG(ERROR) << "Error destroying EGLImage: "
- << ui::GetLastEGLErrorString();
+ DLOG(ERROR) << "Error destroying EGLImage: " << ui::GetLastEGLErrorString();
}
}
@@ -387,14 +384,14 @@ bool AndroidDeferredRenderingBackingStrategy::ShouldCopyPictures() const {
// Mali + <= KitKat crashes when we try to do this. We don't know if it's
// due to detaching a surface texture, but it's the same set of devices.
if (!DoesSurfaceTextureDetachWork())
- return false;
+ return false;
// Other devices are unreliable for other reasons (e.g., EGLImage).
if (gpu::gles2::GLES2Decoder* gl_decoder =
state_provider_->GetGlDecoder().get()) {
if (gpu::gles2::ContextGroup* group = gl_decoder->GetContextGroup()) {
if (gpu::gles2::FeatureInfo* feature_info = group->feature_info()) {
- return !feature_info->workarounds().avda_dont_copy_pictures;
+ return !feature_info->workarounds().avda_dont_copy_pictures;
}
}
}
@@ -403,4 +400,4 @@ bool AndroidDeferredRenderingBackingStrategy::ShouldCopyPictures() const {
return true;
}
-} // namespace content
+} // namespace media

Powered by Google App Engine
This is Rietveld 408576698