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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 2399983003: cc: Make OutputSurface::Reshape abstract (Closed)
Patch Set: reshapeabstract: . Created 4 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/renderer_host/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <unordered_set> 10 #include <unordered_set>
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 void EnsureBackbuffer() override {} 256 void EnsureBackbuffer() override {}
257 257
258 void DiscardBackbuffer() override { 258 void DiscardBackbuffer() override {
259 context_provider()->ContextGL()->DiscardBackbufferCHROMIUM(); 259 context_provider()->ContextGL()->DiscardBackbufferCHROMIUM();
260 } 260 }
261 261
262 void BindFramebuffer() override { 262 void BindFramebuffer() override {
263 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); 263 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0);
264 } 264 }
265 265
266 void Reshape(const gfx::Size& size,
267 float device_scale_factor,
268 const gfx::ColorSpace& color_space,
269 bool has_alpha) override {
270 context_provider()->ContextGL()->ResizeCHROMIUM(
271 size.width(), size.height(), device_scale_factor, has_alpha);
272 }
273
266 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override { 274 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override {
267 return overlay_candidate_validator_.get(); 275 return overlay_candidate_validator_.get();
268 } 276 }
269 277
270 bool IsDisplayedAsOverlayPlane() const override { return false; } 278 bool IsDisplayedAsOverlayPlane() const override { return false; }
271 unsigned GetOverlayTextureId() const override { return 0; } 279 unsigned GetOverlayTextureId() const override { return 0; }
272 bool SurfaceIsSuspendForRecycle() const override { return false; } 280 bool SurfaceIsSuspendForRecycle() const override { return false; }
273 bool HasExternalStencilTest() const override { return false; } 281 bool HasExternalStencilTest() const override { return false; }
274 void ApplyExternalStencil() override {} 282 void ApplyExternalStencil() override {}
275 283
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 834
827 cc::FrameSinkId CompositorImpl::GetFrameSinkId() { 835 cc::FrameSinkId CompositorImpl::GetFrameSinkId() {
828 return frame_sink_id_; 836 return frame_sink_id_;
829 } 837 }
830 838
831 bool CompositorImpl::HavePendingReadbacks() { 839 bool CompositorImpl::HavePendingReadbacks() {
832 return !readback_layer_tree_->children().empty(); 840 return !readback_layer_tree_->children().empty();
833 } 841 }
834 842
835 } // namespace content 843 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698