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

Side by Side Diff: cc/test/fake_output_surface.cc

Issue 2693723002: cc: Move output color space from DrawingFrame to RenderPass (Closed)
Patch Set: Fix typo 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "cc/test/fake_output_surface.h" 5 #include "cc/test/fake_output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "cc/output/output_surface_client.h" 9 #include "cc/output/output_surface_client.h"
10 #include "cc/resources/returned_resource.h" 10 #include "cc/resources/returned_resource.h"
(...skipping 20 matching lines...) Expand all
31 float device_scale_factor, 31 float device_scale_factor,
32 const gfx::ColorSpace& color_space, 32 const gfx::ColorSpace& color_space,
33 bool has_alpha, 33 bool has_alpha,
34 bool use_stencil) { 34 bool use_stencil) {
35 if (context_provider()) { 35 if (context_provider()) {
36 context_provider()->ContextGL()->ResizeCHROMIUM( 36 context_provider()->ContextGL()->ResizeCHROMIUM(
37 size.width(), size.height(), device_scale_factor, has_alpha); 37 size.width(), size.height(), device_scale_factor, has_alpha);
38 } else { 38 } else {
39 software_device()->Resize(size, device_scale_factor); 39 software_device()->Resize(size, device_scale_factor);
40 } 40 }
41 last_reshape_color_space_ = color_space;
41 } 42 }
42 43
43 void FakeOutputSurface::SwapBuffers(OutputSurfaceFrame frame) { 44 void FakeOutputSurface::SwapBuffers(OutputSurfaceFrame frame) {
44 last_sent_frame_.reset(new OutputSurfaceFrame(std::move(frame))); 45 last_sent_frame_.reset(new OutputSurfaceFrame(std::move(frame)));
45 ++num_sent_frames_; 46 ++num_sent_frames_;
46 47
47 if (context_provider()) { 48 if (context_provider()) {
48 last_swap_rect_ = last_sent_frame_->sub_buffer_rect; 49 last_swap_rect_ = last_sent_frame_->sub_buffer_rect;
49 last_swap_rect_valid_ = true; 50 last_swap_rect_valid_ = true;
50 } else { 51 } else {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 95
95 bool FakeOutputSurface::IsDisplayedAsOverlayPlane() const { 96 bool FakeOutputSurface::IsDisplayedAsOverlayPlane() const {
96 return false; 97 return false;
97 } 98 }
98 99
99 unsigned FakeOutputSurface::GetOverlayTextureId() const { 100 unsigned FakeOutputSurface::GetOverlayTextureId() const {
100 return 0; 101 return 0;
101 } 102 }
102 103
103 } // namespace cc 104 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698