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

Side by Side Diff: ui/compositor/test/in_process_context_factory.cc

Issue 2646243002: Use IDCompositionSurface to implement DirectCompositionSurfaceWin. (Closed)
Patch Set: rebase Created 3 years, 9 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 | « services/ui/surfaces/display_output_surface.cc ('k') | ui/gl/gl_angle_util_win.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 "ui/compositor/test/in_process_context_factory.h" 5 #include "ui/compositor/test/in_process_context_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // cc::OutputSurface implementation. 66 // cc::OutputSurface implementation.
67 void BindToClient(cc::OutputSurfaceClient* client) override { 67 void BindToClient(cc::OutputSurfaceClient* client) override {
68 client_ = client; 68 client_ = client;
69 } 69 }
70 void EnsureBackbuffer() override {} 70 void EnsureBackbuffer() override {}
71 void DiscardBackbuffer() override {} 71 void DiscardBackbuffer() override {}
72 void BindFramebuffer() override { 72 void BindFramebuffer() override {
73 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); 73 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0);
74 } 74 }
75 void SetDrawRectangle(const gfx::Rect& rect) override {}
75 void Reshape(const gfx::Size& size, 76 void Reshape(const gfx::Size& size,
76 float device_scale_factor, 77 float device_scale_factor,
77 const gfx::ColorSpace& color_space, 78 const gfx::ColorSpace& color_space,
78 bool has_alpha, 79 bool has_alpha,
79 bool use_stencil) override { 80 bool use_stencil) override {
80 context_provider()->ContextGL()->ResizeCHROMIUM( 81 context_provider()->ContextGL()->ResizeCHROMIUM(
81 size.width(), size.height(), device_scale_factor, has_alpha); 82 size.width(), size.height(), device_scale_factor, has_alpha);
82 } 83 }
83 void SwapBuffers(cc::OutputSurfaceFrame frame) override { 84 void SwapBuffers(cc::OutputSurfaceFrame frame) override {
84 DCHECK(context_provider_.get()); 85 DCHECK(context_provider_.get());
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 data->surface_handle = tracker->AddSurfaceForNativeWidget(widget); 335 data->surface_handle = tracker->AddSurfaceForNativeWidget(widget);
335 #endif 336 #endif
336 } 337 }
337 338
338 PerCompositorData* return_ptr = data.get(); 339 PerCompositorData* return_ptr = data.get();
339 per_compositor_data_[compositor] = std::move(data); 340 per_compositor_data_[compositor] = std::move(data);
340 return return_ptr; 341 return return_ptr;
341 } 342 }
342 343
343 } // namespace ui 344 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/surfaces/display_output_surface.cc ('k') | ui/gl/gl_angle_util_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698