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

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

Issue 1370233003: Disable region copy on ARM since it isn't supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
Patch Set: Created 5 years, 2 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 | « content/browser/compositor/buffer_queue.cc ('k') | ui/ozone/platform/drm/gpu/drm_surface.cc » ('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_surfaceless_browser_compositor_output_s urface.h" 5 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s urface.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 "content/browser/compositor/browser_compositor_overlay_candidate_valida tor.h" 9 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor.h"
9 #include "content/browser/compositor/buffer_queue.h" 10 #include "content/browser/compositor/buffer_queue.h"
10 #include "content/browser/compositor/reflector_impl.h" 11 #include "content/browser/compositor/reflector_impl.h"
11 #include "content/browser/gpu/gpu_surface_tracker.h" 12 #include "content/browser/gpu/gpu_surface_tracker.h"
12 #include "content/common/gpu/client/context_provider_command_buffer.h" 13 #include "content/common/gpu/client/context_provider_command_buffer.h"
13 #include "content/common/gpu/client/gl_helper.h" 14 #include "content/common/gpu/client/gl_helper.h"
14 #include "gpu/GLES2/gl2extchromium.h" 15 #include "gpu/GLES2/gl2extchromium.h"
15 #include "gpu/command_buffer/client/gles2_interface.h" 16 #include "gpu/command_buffer/client/gles2_interface.h"
16 17
17 namespace content { 18 namespace content {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 const gfx::Size& size, 91 const gfx::Size& size,
91 float scale_factor) { 92 float scale_factor) {
92 GpuBrowserCompositorOutputSurface::Reshape(size, scale_factor); 93 GpuBrowserCompositorOutputSurface::Reshape(size, scale_factor);
93 DCHECK(output_surface_); 94 DCHECK(output_surface_);
94 output_surface_->Reshape(SurfaceSize(), scale_factor); 95 output_surface_->Reshape(SurfaceSize(), scale_factor);
95 } 96 }
96 97
97 void GpuSurfacelessBrowserCompositorOutputSurface::OnSwapBuffersCompleted( 98 void GpuSurfacelessBrowserCompositorOutputSurface::OnSwapBuffersCompleted(
98 const std::vector<ui::LatencyInfo>& latency_info, 99 const std::vector<ui::LatencyInfo>& latency_info,
99 gfx::SwapResult result) { 100 gfx::SwapResult result) {
101 bool force_swap = false;
100 if (result == gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS) { 102 if (result == gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS) {
101 // Even through the swap failed, this is a fixable error so we can pretend 103 // Even through the swap failed, this is a fixable error so we can pretend
102 // it succeeded to the rest of the system. 104 // it succeeded to the rest of the system.
103 result = gfx::SwapResult::SWAP_ACK; 105 result = gfx::SwapResult::SWAP_ACK;
104 output_surface_->RecreateBuffers(); 106 output_surface_->RecreateBuffers();
107 force_swap = true;
105 } 108 }
106 GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted(latency_info, 109 GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted(latency_info,
107 result); 110 result);
111 if (force_swap)
112 client_->SetNeedsRedrawRect(gfx::Rect(SurfaceSize()));
108 } 113 }
109 114
110 } // namespace content 115 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/buffer_queue.cc ('k') | ui/ozone/platform/drm/gpu/drm_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698