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

Side by Side Diff: content/browser/compositor/gpu_browser_compositor_output_surface.cc

Issue 1560523002: Use EGL_ANGLE_surface_orientation in Chrome to avoid a blit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | gpu/command_buffer/common/capabilities.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/compositor/gpu_browser_compositor_output_surface.h" 5 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/output/output_surface_client.h" 8 #include "cc/output/output_surface_client.h"
9 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor.h" 9 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor.h"
10 #include "content/browser/compositor/reflector_impl.h" 10 #include "content/browser/compositor/reflector_impl.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 bool GpuBrowserCompositorOutputSurface::BindToClient( 52 bool GpuBrowserCompositorOutputSurface::BindToClient(
53 cc::OutputSurfaceClient* client) { 53 cc::OutputSurfaceClient* client) {
54 if (!BrowserCompositorOutputSurface::BindToClient(client)) 54 if (!BrowserCompositorOutputSurface::BindToClient(client))
55 return false; 55 return false;
56 56
57 GetCommandBufferProxy()->SetSwapBuffersCompletionCallback( 57 GetCommandBufferProxy()->SetSwapBuffersCompletionCallback(
58 swap_buffers_completion_callback_.callback()); 58 swap_buffers_completion_callback_.callback());
59 GetCommandBufferProxy()->SetUpdateVSyncParametersCallback( 59 GetCommandBufferProxy()->SetUpdateVSyncParametersCallback(
60 update_vsync_parameters_callback_.callback()); 60 update_vsync_parameters_callback_.callback());
61 if (capabilities_.uses_default_gl_framebuffer) {
62 capabilities_.flipped_output_surface =
63 context_provider()->ContextCapabilities().gpu.flips_vertically;
64 }
61 return true; 65 return true;
62 } 66 }
63 67
64 void GpuBrowserCompositorOutputSurface::OnReflectorChanged() { 68 void GpuBrowserCompositorOutputSurface::OnReflectorChanged() {
65 if (!reflector_) { 69 if (!reflector_) {
66 reflector_texture_.reset(); 70 reflector_texture_.reset();
67 } else { 71 } else {
68 reflector_texture_.reset(new ReflectorTexture(context_provider())); 72 reflector_texture_.reset(new ReflectorTexture(context_provider()));
69 reflector_->OnSourceTextureMailboxUpdated(reflector_texture_->mailbox()); 73 reflector_->OnSourceTextureMailboxUpdated(reflector_texture_->mailbox());
70 } 74 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 151
148 bool GpuBrowserCompositorOutputSurface::SurfaceIsSuspendForRecycle() const { 152 bool GpuBrowserCompositorOutputSurface::SurfaceIsSuspendForRecycle() const {
149 #if defined(OS_MACOSX) 153 #if defined(OS_MACOSX)
150 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; 154 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED;
151 #else 155 #else
152 return false; 156 return false;
153 #endif 157 #endif
154 } 158 }
155 159
156 } // namespace content 160 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/common/capabilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698