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

Side by Side Diff: cc/output/output_surface.cc

Issue 2235623003: cc: Add gfx::ColorSpace to cc::ResourceProvider resource creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 | « cc/output/output_surface.h ('k') | cc/output/renderer_pixeltest.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/output/output_surface.h" 5 #include "cc/output/output_surface.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 if (context_provider_.get()) 210 if (context_provider_.get())
211 context_provider_->ContextGL()->DiscardBackbufferCHROMIUM(); 211 context_provider_->ContextGL()->DiscardBackbufferCHROMIUM();
212 if (software_device_) 212 if (software_device_)
213 software_device_->DiscardBackbuffer(); 213 software_device_->DiscardBackbuffer();
214 } 214 }
215 215
216 void OutputSurface::Reshape(const gfx::Size& size, 216 void OutputSurface::Reshape(const gfx::Size& size,
217 float scale_factor, 217 float scale_factor,
218 const gfx::ColorSpace& color_space, 218 const gfx::ColorSpace& color_space,
219 bool has_alpha) { 219 bool has_alpha) {
220 color_space_ = color_space; 220 device_color_space_ = color_space;
221 if (size == surface_size_ && scale_factor == device_scale_factor_ && 221 if (size == surface_size_ && scale_factor == device_scale_factor_ &&
222 has_alpha == has_alpha_) 222 has_alpha == has_alpha_)
223 return; 223 return;
224 224
225 surface_size_ = size; 225 surface_size_ = size;
226 device_scale_factor_ = scale_factor; 226 device_scale_factor_ = scale_factor;
227 has_alpha_ = has_alpha; 227 has_alpha_ = has_alpha;
228 if (context_provider_.get()) { 228 if (context_provider_.get()) {
229 context_provider_->ContextGL()->ResizeCHROMIUM(size.width(), size.height(), 229 context_provider_->ContextGL()->ResizeCHROMIUM(size.width(), size.height(),
230 scale_factor, has_alpha); 230 scale_factor, has_alpha);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 if (context_provider_.get()) { 335 if (context_provider_.get()) {
336 context_provider_->SetLostContextCallback( 336 context_provider_->SetLostContextCallback(
337 ContextProvider::LostContextCallback()); 337 ContextProvider::LostContextCallback());
338 } 338 }
339 context_provider_ = nullptr; 339 context_provider_ = nullptr;
340 client_ = nullptr; 340 client_ = nullptr;
341 weak_ptr_factory_.InvalidateWeakPtrs(); 341 weak_ptr_factory_.InvalidateWeakPtrs();
342 } 342 }
343 343
344 } // namespace cc 344 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/output/renderer_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698