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

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, 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
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // cc::OutputSurface implementation. 63 // cc::OutputSurface implementation.
64 void BindToClient(cc::OutputSurfaceClient* client) override { 64 void BindToClient(cc::OutputSurfaceClient* client) override {
65 client_ = client; 65 client_ = client;
66 } 66 }
67 void EnsureBackbuffer() override {} 67 void EnsureBackbuffer() override {}
68 void DiscardBackbuffer() override {} 68 void DiscardBackbuffer() override {}
69 void BindFramebuffer() override { 69 void BindFramebuffer() override {
70 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); 70 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0);
71 } 71 }
72 void SetDrawRectangle(const gfx::Rect& rect) override {}
72 void Reshape(const gfx::Size& size, 73 void Reshape(const gfx::Size& size,
73 float device_scale_factor, 74 float device_scale_factor,
74 const gfx::ColorSpace& color_space, 75 const gfx::ColorSpace& color_space,
75 bool has_alpha, 76 bool has_alpha,
76 bool use_stencil) override { 77 bool use_stencil) override {
77 context_provider()->ContextGL()->ResizeCHROMIUM( 78 context_provider()->ContextGL()->ResizeCHROMIUM(
78 size.width(), size.height(), device_scale_factor, has_alpha); 79 size.width(), size.height(), device_scale_factor, has_alpha);
79 } 80 }
80 void SwapBuffers(cc::OutputSurfaceFrame frame) override { 81 void SwapBuffers(cc::OutputSurfaceFrame frame) override {
81 DCHECK(context_provider_.get()); 82 DCHECK(context_provider_.get());
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 data->surface_handle = tracker->AddSurfaceForNativeWidget(widget); 337 data->surface_handle = tracker->AddSurfaceForNativeWidget(widget);
337 #endif 338 #endif
338 } 339 }
339 340
340 PerCompositorData* return_ptr = data.get(); 341 PerCompositorData* return_ptr = data.get();
341 per_compositor_data_[compositor] = std::move(data); 342 per_compositor_data_[compositor] = std::move(data);
342 return return_ptr; 343 return return_ptr;
343 } 344 }
344 345
345 } // namespace ui 346 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698