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

Side by Side Diff: gpu/ipc/service/pass_through_image_transport_surface.cc

Issue 2673473002: Rename SwapBuffersWithDamage to SwapBuffersWithBounds (Closed)
Patch Set: fix windows compile warning Created 3 years, 10 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 | « gpu/ipc/service/pass_through_image_transport_surface.h ('k') | ui/gl/gl_surface.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "gpu/ipc/service/pass_through_image_transport_surface.h" 5 #include "gpu/ipc/service/pass_through_image_transport_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // We use WeakPtr here to avoid manual management of life time of an instance 51 // We use WeakPtr here to avoid manual management of life time of an instance
52 // of this class. Callback will not be called once the instance of this class 52 // of this class. Callback will not be called once the instance of this class
53 // is destroyed. However, this also means that the callback can be run on 53 // is destroyed. However, this also means that the callback can be run on
54 // the calling thread only. 54 // the calling thread only.
55 gl::GLSurfaceAdapter::SwapBuffersAsync(base::Bind( 55 gl::GLSurfaceAdapter::SwapBuffersAsync(base::Bind(
56 &PassThroughImageTransportSurface::FinishSwapBuffersAsync, 56 &PassThroughImageTransportSurface::FinishSwapBuffersAsync,
57 weak_ptr_factory_.GetWeakPtr(), base::Passed(&latency_info), callback)); 57 weak_ptr_factory_.GetWeakPtr(), base::Passed(&latency_info), callback));
58 } 58 }
59 59
60 gfx::SwapResult PassThroughImageTransportSurface::SwapBuffersWithDamage( 60 gfx::SwapResult PassThroughImageTransportSurface::SwapBuffersWithBounds(
61 int x, 61 const std::vector<gfx::Rect>& rects) {
62 int y,
63 int width,
64 int height) {
65 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info = 62 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info =
66 StartSwapBuffers(); 63 StartSwapBuffers();
67 gfx::SwapResult result = 64 gfx::SwapResult result = gl::GLSurfaceAdapter::SwapBuffersWithBounds(rects);
68 gl::GLSurfaceAdapter::SwapBuffersWithDamage(x, y, width, height);
69 FinishSwapBuffers(std::move(latency_info), result); 65 FinishSwapBuffers(std::move(latency_info), result);
70 return result; 66 return result;
71 } 67 }
72 68
73 gfx::SwapResult PassThroughImageTransportSurface::PostSubBuffer(int x, 69 gfx::SwapResult PassThroughImageTransportSurface::PostSubBuffer(int x,
74 int y, 70 int y,
75 int width, 71 int width,
76 int height) { 72 int height) {
77 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info = 73 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info =
78 StartSwapBuffers(); 74 StartSwapBuffers();
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 182
187 void PassThroughImageTransportSurface::FinishSwapBuffersAsync( 183 void PassThroughImageTransportSurface::FinishSwapBuffersAsync(
188 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info, 184 std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info,
189 GLSurface::SwapCompletionCallback callback, 185 GLSurface::SwapCompletionCallback callback,
190 gfx::SwapResult result) { 186 gfx::SwapResult result) {
191 FinishSwapBuffers(std::move(latency_info), result); 187 FinishSwapBuffers(std::move(latency_info), result);
192 callback.Run(result); 188 callback.Run(result);
193 } 189 }
194 190
195 } // namespace gpu 191 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/pass_through_image_transport_surface.h ('k') | ui/gl/gl_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698